Returns a number of bytes occupied by the specified number of multibyte symbols of the string specified in the UTF-8 format.
- Parameters
-
[in] | pUtf | is the string of cchUtf multibyte characters. The string need to be zero-terminated if cchUtf is (size_t) -1. |
[in] | cchUtf | is a size of the string in multibyte characters corresponding to the returned byte size. |
- Returns
- The function returns a number of bytes occupied by the string or (size_t) -1 if an error occurs. Use GetLastChsvError to get extended error information. If the input string contains an invalid multibyte character the error code set is
CHSVERROR_INVALID_CHAR_SEQUENCE
.