Returns a number of multibyte symbols that are composed from the specified number of bytes of a string encoded in the UTF-8 format.
- Parameters
-
[in] | pszUtf | is a pointer to the string. If cbUtf is (size_t) -1 the string must be zero-terminated. |
[in] | cbUtf | is a byte size of the string. The value can be (size_t) -1 if the string is zero-terminated. |
- Returns
- Returns an actual number of multibyte characters described by the bytes of the string in the current codepage. If function fails it returns (size_t) -1 setting corresponding chsvlib error code. If the string contains illegal byte sequence the error code set is CHSVERROR_INVALID_CHAR_SEQUENCE.