MBTOWC(3) Linux Programmer's Manual MBTOWC(3)
NAME
mbtowc - convert a multibyte sequence to a wide character
SYNOPSIS
#include <stdlib.h>
int mbtowc(wchar_t *pwc, const char *s, size_t n);
DESCRIPTION
The main case for this function is when s is not NULL and pwc is not NULL. In this case, the mbtowc() function inspects at most n bytes of
the multibyte string starting at s, extracts the next complete multibyte character, converts it to a wide character and stores it at *pwc.
It updates an internal shift state only known to the mbtowc function. If s does not point to a '