7.24.6.3.1 The mbrlen function

Synopsis

1

#include <wchar.h>
size_t mbrlen(const char * restrict s,
     size_t n,
     mbstate_t * restrict ps);

Description

2

The mbrlen function is equivalent to the call:

mbrtowc(NULL, s, n, ps != NULL ? ps : &internal)

where internal is the mbstate_t object for the mbrlen function, except that the expression designated by ps is evaluated only once.

Returns

3

The mbrlen function returns a value between zero and n, inclusive, (size_t)(-2), or (size_t)(-1).

Forward References