function
<cstdlib>
mbstowcssize_t mbstowcs (wchar_t* dest, const char* src, size_t max);
Convert multibyte string to wide-character string
Translates the multibyte sequence pointed by src to the equivalent sequence of wide-characters (which is stored in the array pointed by dest), up until either max wide characters have been translated or until a null character is encountered in the multibyte sequence src (which is also translated and stored, but not counted in the length returned by the function).If max characters are successfully translated, the resulting string stored in dest is not null-terminated.
The behavior of this function depends on the LC_CTYPE category of the selected C locale.
wchar_t
elements long enough to contain the resulting sequence (at most, max wide characters).
wchar_t
characters to write to dest.
(size_t)-1
is returned.
If dest does not point to an array long enough to contain the translated sequence, or if src is either not null-terminated or does not contain enough bytes to generate max wide characters (or if it does not begin in the initial shift state), it causes undefined behavior.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4