Synopsis
size_t strnlen(const char *s,
               size_t n);
Description

strnlen returns the length of the string pointed to by s, up to a maximum of n characters. strnlen only examines the first n characters of the string s.

Note

strnlen conforms to POSIX.1-2008.