WCSNLEN(3)

NAME
wcsnlen - get fixed-size wide-character string length

SYNOPSIS

#include <wchar.h>

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

DESCRIPTION

The wcsnlen function computes the number of wide-character codes in the wide-character string pointed to by s not including the terminating L'\0' wide character but at most maxlen wide characters.

RETURNS

wcsnlen returns the length of s if it is less then maxlen, or maxlen if there is no L'\0' wide character in first maxlen characters.

PORTABILITY

wcsnlen is a GNU extension.

wcsnlen requires no supporting OS subroutines.