RAD Studio VCL Reference
SysUtils.WideBytesOf Function

Converts an Unicode string to an array of bytes.

function WideBytesOf(const Value: UnicodeString): TBytes;
TBytes WideBytesOf(const UnicodeString Value);

Call WideBytesOf to convert an Unicode string to an array of bytes. Strings are converted using the UTF-16 encoding, represented by the Unicode property of the TEncoding class.  

Unlike the BytesOf routine, the resulting array of bytes contains two bytes per character in the input string. 


Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!