Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

mblen - Determine number of bytes of a multibyte character

&pagelevel(4)&pagelevel

Definition

#include <stdlib.h>

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

mblen returns the number of bytes of a multibyte character to which s points. A maximum
of n bytes in s are evaluated.

Return val.

-1

0

1

if n = 0.

if s is a NULL pointer or points to a null byte (\0).

otherwise.

Note

In this implementation, there are no characters that consist of several bytes. Multibyte
characters always have a length of 1.

See also

mbstowcs, mbtowc, wcstombs, wctomb