Text::GetUnicodeCharCount
Defined in:
Returns the number of UTF-8 characters in a string.
TSText.h
Prototype
int32 GetUnicodeCharCount(const char *text);
Parameters
text |
A pointer to a null-terminated character string. |
Description
The GetUnicodeCharCount
function returns the number of individual characters encoded as UTF-8 in the string specified by the text
parameter. This number is at most the number of bytes occupied by the string, but it is less for strings containing multi-byte characters. Each character is counted as one unit regardless of the number of bytes it occupies.The string must be null-terminated by a zero byte. The null terminator is not included in the length.
See Also