3 <<strnlen>>---character string length
10 size_t strnlen(const char *<[str]>, size_t <[n]>);
14 size_t strnlen(<[str]>, <[n]>)
19 The <<strnlen>> function works out the length of the string
20 starting at <<*<[str]>>> by counting chararacters until it
21 reaches a NUL character or the maximum: <[n]> number of
22 characters have been inspected.
25 <<strnlen>> returns the character count or <[n]>.
28 <<strnlen>> is a Gnu extension.
30 <<strnlen>> requires no supporting OS subroutines.
34 #undef __STRICT_ANSI__
39 _DEFUN (strnlen
, (str
, n
),
43 _CONST
char *start
= str
;
45 while (*str
&& n
-- > 0)