[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] | Reference for unit 'System' (#rtl)

# StringToUnicodeChar

Convert an ansistring to a null-terminated array of unicode characters.

## Declaration

Source position: ustringh.inc line 41

`function StringToUnicodeChar(`
`const Src: AnsiString;`
`Dest: PUnicodeChar;`
`DestSize: SizeInt`
`):PUnicodeChar;`

## Description

StringToUnicodeChar converts the ansistring S to a unicodestring and places the result in Dest. The size of the memory location pointed to by Dest must be given in DestSize. If the result string is longer than the available size, the result string will be truncated.

The function always returns Dest.

## Errors

No check is performed to see whether Dest points to a valid memory location.

## See also

UnicodeCharToString |  | Convert unicode character to string
UnicodeCharLenToString |  | Convert a memory buffer with unicode characters to an ansistring

Documentation generated on: Feb 26 2014