2.13.7.1 mblen

Declaration:

int mblen(const char *str, size_t n);

Returns the length of a multibyte character pointed to by the argument str. At most n bytes will be examined.

If str is a null pointer, then zero is returned if multibyte characters are not state-dependent (shift state). Otherwise a nonzero value is returned if multibyte character are state-dependent.

If str is not null, then the number of bytes that are contained in the multibyte character pointed to by str are returned. Zero is returned if str points to a null character. A value of -1 is returned if str does not point to a valid multibyte character.