RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
SysUtils.WideBytesOf Function

Converts an Unicode string to an array of bytes.

Pascal
function WideBytesOf(const Value: UnicodeString): TBytes;
C++
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!