1 .\" Copyright (c) Bruno Haible <haible@clisp.cons.org>
3 .\" %%%LICENSE_START(GPLv2+_DOC_ONEPARA)
4 .\" This is free documentation; you can redistribute it and/or
5 .\" modify it under the terms of the GNU General Public License as
6 .\" published by the Free Software Foundation; either version 2 of
7 .\" the License, or (at your option) any later version.
10 .\" References consulted:
11 .\" GNU glibc-2 source code and manual
12 .\" Dinkumware C library reference http://www.dinkumware.com/
13 .\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html
16 .TH MBRLEN 3 2015-08-08 "GNU" "Linux Programmer's Manual"
18 mbrlen \- determine number of bytes in next multibyte character
23 .BI "size_t mbrlen(const char *" s ", size_t " n ", mbstate_t *" ps );
28 function inspects at most
30 bytes of the multibyte
33 and extracts the next complete multibyte character.
34 It updates the shift state
36 If the multibyte character is not the
37 null wide character, it returns the number of bytes that were consumed from
39 If the multibyte character is the null wide character, it resets the
42 to the initial state and returns 0.
48 do not contain a complete multibyte
53 This can happen even if
57 if the multibyte string contains redundant shift
60 If the multibyte string starting at
62 contains an invalid multibyte
63 sequence before the next complete character,
78 is NULL, a static anonymous state known only to the
80 function is used instead.
84 function returns the number of bytes
85 parsed from the multibyte
88 if a non-null wide character was recognized.
89 It returns 0, if a null wide character was recognized.
96 if an invalid multibyte sequence was
100 if it couldn't parse a complete multibyte
101 character, meaning that
105 For an explanation of the terms used in this section, see
111 Interface Attribute Value
114 T} Thread safety MT-Unsafe race:mbrlen/!ps
117 POSIX.1-2001, POSIX.1-2008, C99.