System.StringToWideChar

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function StringToWideChar(const Source: UnicodeString; Dest: PWideChar; DestSize: Integer): PWideChar;

C++

extern DELPHI_PACKAGE WideChar * __fastcall StringToWideChar(const UnicodeString Source, WideChar * Dest, int DestSize);

Properties

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

Description

Returns a UNICODE string from an AnsiString.

StringToWideChar converts a string from ANSI to UNICODE and stores the result in a specified buffer.

Source is the string to convert. It must include at most DestSize – 1 characters.

Dest is the buffer into which StringToWideChar writes the corresponding UNICODE string. The caller allocates this memory to include at least DestSize wide characters. Following the call, Dest contains at most DestSize - 1 characters, terminated by a NULL wide character.

DestSize is the size of the buffer Dest.

StringToWideChar returns a pointer to Dest.

See Also