3 <<strnlen>>---character string length
10 size_t strnlen(const char *<[str]>, size_t <[n]>);
13 The <<strnlen>> function works out the length of the string
14 starting at <<*<[str]>>> by counting chararacters until it
15 reaches a NUL character or the maximum: <[n]> number of
16 characters have been inspected.
19 <<strnlen>> returns the character count or <[n]>.
22 <<strnlen>> is a GNU extension.
24 <<strnlen>> requires no supporting OS subroutines.
28 #undef __STRICT_ANSI__
33 strnlen (const char *str
,
36 const char *start
= str
;
38 while (n
-- > 0 && *str
)