1WCSNLEN(3) Linux Programmer's Manual WCSNLEN(3)
2
3
4
6 wcsnlen - determine the length of a fixed-size wide-character string
7
9 #define _GNU_SOURCE
10 #include <wchar.h>
11
12 size_t wcsnlen(const wchar_t *s, size_t maxlen);
13
15 The wcsnlen() function is the wide-character equivalent of the
16 strnlen(3) function. It returns the number of wide-characters in the
17 string pointed to by s, not including the terminating L'\0' character,
18 but at most maxlen. In doing this, wcsnlen() looks only at the first
19 maxlen wide-characters at s and never beyond s+maxlen.
20
22 The wcsnlen() function returns wcslen(s), if that is less than maxlen,
23 or maxlen if there is no L'\0' character among the first maxlen wide
24 characters pointed to by s.
25
27 This function is a GNU extension.
28
30 strnlen(3), wcslen(3)
31
33 This page is part of release 3.22 of the Linux man-pages project. A
34 description of the project, and information about reporting bugs, can
35 be found at http://www.kernel.org/doc/man-pages/.
36
37
38
39GNU 2007-07-26 WCSNLEN(3)