English pages are provided only to compare translations to original pages,
better looking pages can be browsed
at the Linux man-pages official site.
Linux Programmer's Manual (3)
mbrlen - determine number of bytes in next multibyte character
size_t mbrlen(const char *s, size_t n, mbstate_t *ps);
function inspects at most
bytes of the multibyte
string starting at
and extracts the next complete multibyte character.
It updates the shift state
If the multibyte character is not the
null wide character, it returns the number of bytes that were consumed from
If the multibyte character is the null wide character, it resets the
to the initial state and returns 0.
bytes starting at
do not contain a complete multibyte
This can happen even if
if the multibyte string contains redundant shift
If the multibyte string starting at
contains an invalid multibyte
sequence before the next complete character,
In this case,
the effects on
is NULL, a static anonymous state known only to the
function is used instead.
function returns the number of bytes
parsed from the multibyte
sequence starting at
if a non-null wide character was recognized.
It returns 0, if a null wide character was recognized.
if an invalid multibyte sequence was
if it couldn't parse a complete multibyte
character, meaning that
should be increased.
Multithreading (see pthreads(7))
function is thread-safe with exceptions.
It is not thread-safe if called with a NULL ps
The behavior of
depends on the
category of the
This page is part of release 3.66 of the Linux
A description of the project,
information about reporting bugs,
and the latest version of this page,
can be found at
- RETURN VALUE
- Multithreading (see pthreads(7))
- CONFORMING TO
- SEE ALSO
This document was created by
using the manual pages.
Time: 21:43:01 GMT, July 12, 2014