*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->Linux man pages -> strnlen (3)              
Title
Content
Arch
Section
 

STRNLEN(3)

Contents


NAME    [Toc]    [Back]

       strnlen - determine the length of a fixed-size string

SYNOPSIS    [Toc]    [Back]

       #include <string.h>

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

DESCRIPTION    [Toc]    [Back]

       The  strnlen  function  returns	the number of characters in the string
       pointed to by s, not including the terminating '\0' character,  but  at
       most  maxlen.  In  doing  this,	strnlen looks only at the first maxlen
       characters at s and never beyond s+maxlen.

RETURN VALUE    [Toc]    [Back]

       The strnlen function returns strlen(s), if that is less than maxlen, or
       maxlen  if there is no '\0' character among the first maxlen characters
       pointed to by s.

CONFORMING TO    [Toc]    [Back]

       This function is a GNU extension.

SEE ALSO    [Toc]    [Back]

      
      
       strlen(3)



GNU				  1999-07-25			    STRNLEN(3)
[ Back ]
 Similar pages
Name OS Title
wcsnlen Linux determine the length of a fixed-size wide-character string
Tie::SubstrHash IRIX Fixed-table-size, fixed-key-length hashing
wcswidth Linux determine columns needed for a fixed-size wide character string
stpncpy Linux copy a fixed-size string, returning a pointer to its end
wcsncpy Linux copy a fixed-size string of wide characters
wcpncpy Linux copy a fixed-size string of wide characters, returning a pointer to its end
wcslen Linux determine the length of a wide-character string
wcsncmp Linux compare two fixed-size wide-character strings
wcsncasecmp Linux compare two fixed-size wide-character strings, ignoring case
mbrlen Tru64 Determine the length in bytes of a multibyte character
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service