WCSLEN(3C) Standard C Library Functions WCSLEN(3C)

wcslen, wcsnlenget length of wide-character string

#include <wchar.h>

size_t
wcslen(const wchar_t *string);

size_t
wcsnlen(const wchar_t *string, size_t maxlen);

The () and wcsnlen() functions count the number of wide-characters that are present in string. They stop counting when they encounter a null wide-character. The terminating null wide-character is not included in the count.

Additionally, () stops counting after it has counted maxlen wide-characters.

The () and wcsnlen() functions are the wide-character equivalents of strlen(3C) and strnlen(3C), respectively.

The wcslen() function returns the length of string. The wcsnlen() function returns the smaller of the length of string and maxlen.

None.

.

.

free(3C), strlen(3C), strnlen(3C), wchar.h(3HEAD), locale(7), standards(7)

The wcslen() function was introduced in X/Open Portability Guide Issue 4 (“XPG4”) and standardized in ISO/IEC 9899:1999 (“ISO C99”). The wcsnlen() function was introduced in IEEE Std 1003.1-2008 (“POSIX.1”).

November 4, 2014 OmniOS