DESCRIPTION
The mbrtowc function inspects at most n bytes pointed to by s to determine the number of bytes needed to complete the next multibyte character. If a character can be completed, and pwc is not NULL, the wide character which is represented by s is stored in the
.Vt wchar_t it points to. If s is NULL, mbrtowc behaves as if pwc was NULL, s was an empty string ("") and n was 1.
The
.Vt mbstate_t argument, ps, is used to keep track of the shift state. If it is NULL, mbrtowc uses an internal, static
.Vt mbstate_t object, which is initialized to the initial conversion state at program startup.
RETURN VALUES
The mbrtowc functions returns: