#include <stdlib.h> int wctomb(char *s, wchar_t wc);
The programmer must ensure that there is room for at least MB_CUR_MAX bytes at s.
If s is NULL, the wctomb() function resets the shift state, known only to this function, to the initial state, and returns nonzero if the encoding has nontrivial shift state, or zero if the encoding is stateless.
|wctomb()||Thread safety||MT-Unsafe race|
The function wcrtomb(3) provides a better interface to the same functionality.