WCRTOMB(3) BSD Library Functions Manual WCRTOMB(3)
wcrtomb, c16rtomb, c32rtomb -- convert a wide-character code to a character (restartable)
Standard C Library (libc, -lc)
wcrtomb(char * restrict s, wchar_t c, mbstate_t * restrict ps);
c16rtomb(char * restrict s, char16_t c, mbstate_t * restrict ps);
c32rtomb(char * restrict s, char32_t c, mbstate_t * restrict ps);
The wcrtomb(), c16rtomb() and c32rtomb() functions store a multibyte sequence representing the wide character c, including any necessary
shift sequences, to the character array s, storing a maximum of MB_CUR_MAX bytes.
If s is NULL, these functions behave as if s pointed to an internal buffer and c was a null wide character (L'