MBSTOWCS(3) Linux Programmer's Manual MBSTOWCS(3)
mbstowcs - convert a multibyte string to a wide-character string
size_t mbstowcs(wchar_t *dest, const char *src, size_t n);
If dest is not NULL, the mbstowcs() function converts the multibyte string src to a wide-character string starting at dest. At most n wide
characters are written to dest. The sequence of characters in the string src shall begin in the initial shift state. The conversion can
stop for three reasons:
1. An invalid multibyte sequence has been encountered. In this case, (size_t) -1 is returned.
2. n non-L'