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

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

STRCSPN(3)

Contents


NAME    [Toc]    [Back]

     strcspn - span the complement of a string

SYNOPSIS    [Toc]    [Back]

     #include <string.h>

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

DESCRIPTION    [Toc]    [Back]

     The strcspn() function spans the initial part of  the  nullterminated
     string  s  as  long as the characters from s do not occur in
string charset
     (it spans the complement of charset).

RETURN VALUES    [Toc]    [Back]

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

EXAMPLES    [Toc]    [Back]

     The  following  call  to  strcspn() will return 3, since the
first three
     characters of string s do not occur in string charset:

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

           span = strcspn(s, charset);

SEE ALSO    [Toc]    [Back]

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

STANDARDS    [Toc]    [Back]

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

OpenBSD     3.6                           June      29,      1991
[ Back ]
 Similar pages
Name OS Title
strspn OpenBSD span a string
strspn FreeBSD span a string
strspn NetBSD span a string
compl IRIX Computes complement
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 Tru64 A compound string function that underlines a string drawn in an X Window
XmStringDrawUnderline HP-UX A compound string function that underlines a string drawn in an X Window
XmStringDrawUnderline IRIX A compound string function that underlines a string drawn in an X Window
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service