NAME
strlen
, strnlen
— find length of
string
LIBRARY
library “libc”
SYNOPSIS
#include
<string.h>
size_t
strlen
(const
char *s);
size_t
strnlen
(const
char *s, size_t
maxlen);
DESCRIPTION
Thestrlen
()
function computes the length of the string s. The
strnlen
()
function attempts to compute the length of s, but never
scans beyond the first maxlen bytes of
s.
RETURN VALUES
The strlen
() function returns the number
of characters that precede the terminating NUL
character.
SEE ALSO
STANDARDS
The strlen
() function conforms to
ISO/IEC 9899:1990 (“ISO C90”).
The strnlen
() function conforms to
IEEE Std 1003.1-2008 (“POSIX.1”).