int mblen_l(const char *s,
            size_t n,
            __locale_s *loc);

mblen_l determines the number of bytes contained in the multi-byte character pointed to by s in the locale loc.

If s is a null pointer, mblen_l returns a nonzero or zero value, if multi-byte character encodings, respectively, do or do not have state-dependent encodings

If s is not a null pointer, mblen_l either returns 0 (if s points to the null character), or returns the number of bytes that are contained in the multi-byte character (if the next n or fewer bytes form a valid multi-byte character), or returns −1 (if they do not form a valid multi-byte character).


Except that the conversion state of the mbtowc_l function is not affected, it is equivalent to

mbtowc((wchar_t *)0, s, n, loc); 

It is guaranteed that no library function in the Standard C library calls mblen_l.

See Also

mblen_l, mbtowc_l