|
pure virtual |
Get number of bytes in a (possibly multi-byte) character.
Calling this function is equivalent to the following code sequence:
If pMbs is a null pointer, the mbrlen() function uses its own internal mbstate_t object, which is initialised at program startup to the initial conversion state. Otherwise, the mbstate_t object pointed to by pMbs is used to describe the current conversion state of the associated character sequence.
For UTF8 encoded strings the caller can use the utf8ToWcs and utf8ToWc functions directly.
pSrc | [ in ] Pointer to a (multi-byte) character string. |
srcSize | [ in ] The number of bytes of data pointed to by pSrc to count. |
pMbs | [ in ] Pointer to the current conversion state |
pResultSize | [ out ] Pointer to where the length of the character string pSrc is written. |
Success | P6R::eOk | |
Failure | P6R::eFail | An encoding error occurs where the next n or fewer bytes do not contribute to a complete and valid character. |
P6R::eNotInitialized | A successful call to initialize was not made before this call. |