System.SysUtils.TMarshaller.AsAnsi

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function AsAnsi(const S: string): TPtrWrapper; overload;
function AsAnsi(S: PWideChar): TPtrWrapper; overload;
function AsAnsi(const S: string; CodePage: Word): TPtrWrapper; overload;
function AsAnsi(S: PWideChar; CodePage: Word): TPtrWrapper; overload;

C++

System::TPtrWrapper __fastcall AsAnsi(const System::UnicodeString S)/* overload */;
System::TPtrWrapper __fastcall AsAnsi(System::WideChar * S)/* overload */;
System::TPtrWrapper __fastcall AsAnsi(const System::UnicodeString S, System::Word CodePage)/* overload */;
System::TPtrWrapper __fastcall AsAnsi(System::WideChar * S, System::Word CodePage)/* overload */;

Properties

Type Visibility Source Unit Parent
function public
System.SysUtils.pas
System.SysUtils.hpp
System.SysUtils TMarshaller

Description

Returns a wrapped pointer to the character data of a string.

The AsAnsi group of overloaded methods transforms the string to a multi-byte character encoding before storing it into the buffer. The first two overloaded methods use default encoding; the other two take the CodePage argument indicating which encoding to use.

See Also