RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
System.StringElementSize Function

Returns the number of bytes that represent a character in the string.

Pascal
function StringElementSize(const S: UnicodeString): Word; overload;
function StringElementSize(const S: RawByteString): Word; overload;
C++
Word StringElementSize(const UnicodeString S);
Word StringElementSize(const RawByteString S);

Call StringElementSize to obtain the number of bytes necessary to represent one character in the current string. Calling StringElementSize for Unicode strings always returns a result of 2. 

 

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