wcstombs(3) Library Functions Manual wcstombs(3) wcstombs - Standard C library (libc, -lc) #include size_t wcstombs(char dest[restrict .n], const wchar_t *restrict src, size_t n); dest NULL, wcstombs() src , dest. dest n . , dest, . : o ( ). (size_t) -1. o . , dest, . o The wide-character string has been completely converted, including the terminating null wide character (L'\0'). In this case, the conversion ends in the initial shift state. The number of bytes written to dest, excluding the terminating null byte ('\0'), is returned. , dest , , n . dest NULL, n , , . , 2, , n wcstombs(NULL,src,0)+1. wcstombs() , null. , , (size_t) -1. attributes(7). +----------------------------+----------------------------------------------------------+--------------------------+ | | | | +----------------------------+----------------------------------------------------------+--------------------------+ |wcstombs() | | MT-Safe | +----------------------------+----------------------------------------------------------+--------------------------+ wcsrtombs(3) . C11, POSIX.1-2008. POSIX.1-2001, C99. wcstombs() LC_CTYPE . mblen(3), mbstowcs(3), mbtowc(3), wcsrtombs(3), wctomb(3) () Azamat Hackimov , Yuri Kozlov Kirill Rekhov ; GNU (GNU General Public License - GPL, 3 ) , - . - , , () () () <>. Linux man-pages 6.12 23 2024 . wcstombs(3)