c/string/multibyte/mbrlen

Determines the size, in bytes, of the representation of a multibyte character.

This function is equivalent to the call for some hidden object  of type mbstate_t, except that the expression  is evaluated only once.

Return value
The first of the following that applies:
 * if the next or fewer bytes complete the null character or if  is a null pointer. Both cases reset the conversion state.
 * the number of bytes that complete a valid multibyte character
 * if the next bytes are part of a possibly valid multibyte character, which is still incomplete after examining all  bytes
 * if encoding error occurs. The value of errno is ; the conversion state is unspecified.