RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
UnicodeString::ByteType Method

Indicates the kind of byte that occupies specified position in System::UnicodeString.

Pascal
function ByteType(index: Integer): TStringLeadCharType;
C++
__fastcall TStringLeadCharType ByteType(int index) const;

System::UnicodeString::ByteType indicates what kind of byte exists at the byte indicated by index (counting from 1) in the System::UnicodeString. Note that index is an element index into the string, not a character or byte index. These are the possible return values.

Constant 
Meaning 
ctNotLeadChar  
Not a lead character.  
ctbLeadSurrogate  
Lead surrogate pair character.  
ctTrailSurrogate  
Trailing surrogate pair character.  

Note: No checking is done to ensure that index is less than the length of the string. It is the caller's responsibility to ensure that Index is not out of bounds.
 

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