strnlen

Name

strnlen -- determine the length of a fixed-size string

Synopsis

#include <string.h>

size_t strnlen(const char * s, size_t maxlen);

Description

The strnlen() function shall compute the number of bytes in the array to which s points, stopping at maxlen bytes. A null byte and any bytes following it are not counted.

Return Value

The strnlen() function shall return the length of s if that is less than maxlen, or maxlen if there is no null byte in the first maxlen bytes.

Errors

No errors are defined.