wcsnlen(3) Library Functions Manual wcsnlen(3) wcsnlen - C (libc, -lc) #include size_t wcsnlen(const wchar_t s[], size_t maxlen); glibc (. feature_test_macros(7)): wcsnlen(): glibc 2.10: _POSIX_C_SOURCE >= 200809L glibc 2.10: _BSD_SOURCE The wcsnlen() function is the wide-character equivalent of the strnlen(3) function. It returns the number of wide-characters in the string pointed to by s, not including the terminating null wide character (L'\0'), but at most maxlen wide characters (note: this parameter is not a byte count). In doing this, wcsnlen() looks at only the first maxlen wide characters at s and never beyond s[maxlen-1]. wcsnlen() wcslen(s), maxlen, maxlen, maxlen , s, null. attributes(7). +----------------------------+----------------------------------------------------------+--------------------------+ | | | | +----------------------------+----------------------------------------------------------+--------------------------+ |wcsnlen() | | MT-Safe | +----------------------------+----------------------------------------------------------+--------------------------+ POSIX.1-2008. glibc 2.1. strnlen(3), wcslen(3) () Azamat Hackimov Yuri Kozlov ; GNU (GNU General Public License - GPL, 3 ) , - . - , , () () () . Linux man-pages 6.18 8 2026 . wcsnlen(3)