mblen
raw OCR
Determines the length of a multibyte character.
Defined in header <stdlib.h>
Syntax
#include <stdlib.h>
int mblen(const char *s, size_t n);
Portability
| DOS | UNIX | Windows | ANSI C | C++ only |
|---|---|---|---|---|
| ■ | ■ | ■ |
Remarks
If s is not NULL, mblen determines the multibyte character pointed to by
| s. The maximum | number of bytes examined is specified by n. |
| The behavior of mblen is affected by the setting of LCCTYPE | category of |
the current locale.
Return value
If s is null, mblen returns a nonzero value if multibyte characters have state-dependent encodings. Otherwise, mblen returns zero.
If s is not null, mblen returns the following:
zero if s points to the null character;
| -1 | if the next n bytes do not comprise a valid multibyte character; |
the number of bytes that comprise a vaHd multibyte charter.
See also
Differences from modern implementations
Nothing recorded yet.
Modern references
These are search links, not yet checked by hand.
Stable link: /3.1/stdlib.h/mblen/
· short form /3.1/mblen/