RAD Studio VCL Reference
|
Indicates whether a byte in a string is a single byte character, the first byte of a double byte character, or the second byte of a double byte character.
function StrByteType(Str: PAnsiChar; Index: Cardinal): TMbcsByteType; overload; function StrByteType(Str: PWideChar; Index: Cardinal): TMbcsByteType; overload;
TMbcsByteType StrByteType(PAnsiChar Str, unsigned Index); TMbcsByteType StrByteType(PWideChar Str, unsigned Index);
Call StrByteType to determine the type of the byte specified by the Index parameter, where 0 specifies the first byte in the string Str, 1 specifies the second byte, and so on.
If the system is not using a multi-byte character system (MBCS), StrByteType always returns mbSingleByte. Otherwise, StrByteType returns mbSingleByte if the indicated byte represents a complete character in Str, mbLeadByte if it represents the first byte of a double byte character, and mbTrailByte if it represents the second byte of a double byte character.
Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
|
What do you think about this topic? Send feedback!
|