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;

Properties

Type Visibility Source Unit Parent
function public System.SysUtils.pas 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