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

  man pages->OpenBSD man pages -> strspn (3)              
Title
Content
Arch
Section
 

STRSPN(3)

Contents


NAME    [Toc]    [Back]

     strspn - span a string

SYNOPSIS    [Toc]    [Back]

     #include <string.h>

     size_t
     strspn(const char *s, const char *charset);

DESCRIPTION    [Toc]    [Back]

     The strspn() function spans the initial part  of  the  nullterminated
     string  s  as  long as the characters from s occur in string
charset.

RETURN VALUES    [Toc]    [Back]

     The strspn()  function  returns  the  number  of  characters
spanned.

EXAMPLES    [Toc]    [Back]

     The  following  call  to  strspn()  will return 3, since the
first three characters
 of string s are part of string charset:

           char *s = "foobar";
           char *charset = "of";
           size_t span;

           span = strspn(s, charset);

SEE ALSO    [Toc]    [Back]

      
      
     memchr(3), strchr(3),  strcspn(3),  strpbrk(3),  strrchr(3),
strsep(3),
     strstr(3), strtok(3)

STANDARDS    [Toc]    [Back]

     The  strspn()  function conforms to ANSI X3.159-1989 (``ANSI
C'').

OpenBSD     3.6                           June      29,      1991
[ Back ]
 Similar pages
Name OS Title
strcspn OpenBSD span the complement of a string
strcspn FreeBSD span the complement of a string
strcspn NetBSD span the complement of a string
XmCvtByteStreamToXmString HP-UX A compound string function that converts from a compound string in Byte Stream format to a compound string
XmStringFreeContext HP-UX A compound string function that releases the string scanning context data structure
XmStringConcatAndFree HP-UX A compound string function that appends one string to another and frees the original strings
XmStringDrawUnderline HP-UX A compound string function that underlines a string drawn in an X Window
XmTextFieldInsert HP-UX A TextField function that inserts a character string into a text string
XmStringDrawUnderline IRIX A compound string function that underlines a string drawn in an X Window
DXmCvtFCtoCS Tru64 Converts a string in the file-compatible format to a compound string.
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service