cpp/string/multibyte/mblen

Determines the size, in bytes, of the multibyte character whose first byte is pointed to by.

If is a null pointer, resets the global conversion state and determines whether shift sequences are used.

This function is equivalent to the call, except that conversion state of std is unaffected.

Return value
If is not a null pointer, returns the number of bytes that are contained in the multibyte character or  if the first bytes pointed to by  do not form a valid multibyte character or  if  is pointing at the null character.

If is a null pointer, resets its internal conversion state to represent the initial shift state and returns  if the current multibyte encoding is not state-dependent (does not use shift sequences) or a non-zero value if the current multibyte encoding is state-dependent (uses shift sequences).