wcsnrtombs(3) Library Functions Manual wcsnrtombs(3) wcsnrtombs - LIBRARY Standard C library (libc, -lc) #include size_t wcsnrtombs(char dest[restrict .len], const wchar_t **restrict src, size_t nwc, size_t len, mbstate_t *restrict ps); glibc (. feature_test_macros(7)): wcsnrtombs(): glibc 2.10: _POSIX_C_SOURCE >= 200809L glibc 2.10: _BSD_SOURCE wcsnrtombs() wcsrtombs(3), , , *src, nwc. dest NULL, wcsnrtombs() nwc *src , dest. dest len . *ps. wcrtomb(dest, *src, ps) , . dest , *src -- . : o ( ). *src , (size_t) -1, errno EILSEQ. o nwc wide characters have been converted without encountering a null wide character (L'\0'), or the length limit forces a stop. In this case, *src is left pointing to the next wide character to be converted, and the number of bytes written to dest is returned. o The wide-character string has been completely converted, including the terminating null wide character (which has the side effect of bringing back *ps to the initial state). In this case, *src is set to NULL, and the number of bytes written to dest, excluding the terminating null byte ('\0'), is returned. dest NULL, len , , . , ps NULL, , wcsnrtombs(). , dest , , len . wcsrntombs() , null. , , (size_t) -1 errno EILSEQ. attributes(7). +----------------------------+----------------------------------------------------------+--------------------------+ | | | | +----------------------------+----------------------------------------------------------+--------------------------+ |wcsnrtombs() | | MT-Unsafe | | | | race:wcsnrtombs/!ps | +----------------------------+----------------------------------------------------------+--------------------------+ POSIX.1-2008. wcsnrtombs() LC_CTYPE . NULL ps . . iconv(3), mbsinit(3), wcsrtombs(3) Azamat Hackimov Yuri Kozlov ; GNU 3 , . . , , . Linux man-pages 6.06 31 2023 . wcsnrtombs(3)