std::wcrtomb (3) Linux Manual Page
std::wcrtomb – std::wcrtomb
Synopsis
Defined in header<cwchar>
std::size_t wcrtomb(char *s, wchar_t wc, std::mbstate_t *ps);
Converts a wide character to its narrow multibyte representation.
If s is not a null pointer, the function determines the number of bytes necessary to store the multibyte character representation of wc (including any shift sequences, and taking into account the current multibyte conversion state *ps), and stores the multibyte character representation in the character array whose first element is pointed to by s, updating *ps as necessary. At most MB_CUR_MAX bytes can be written by this function.
If s is a null pointer, the call is equivalent to std::wcrtomb(buf, L’
