cpp/string/multibyte/mbrlen

Determines the size, in bytes, of the remainder of the multibyte character whose first byte is pointed to by, given the current conversion state.

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

Return value
if the next or fewer bytes complete the null character.

The number of bytes (between and ) that complete a valid multibyte character.

if encoding error occurs.

if the next bytes are part of a possibly valid multibyte character, which is still incomplete after examining all  bytes.