1STRSPN(3)                  Linux Programmer's Manual                 STRSPN(3)
2
3
4

NAME

6       strspn, strcspn - search a string for a set of characters
7

SYNOPSIS

9       #include <string.h>
10
11       size_t strspn(const char *s, const char *accept);
12
13       size_t strcspn(const char *s, const char *reject);
14

DESCRIPTION

16       The strspn() function calculates the length of the initial segment of s
17       which consists entirely of characters in accept.
18
19       The strcspn() function calculates the length of the initial segment  of
20       s which consists entirely of characters not in reject.
21

RETURN VALUE

23       The  strspn()  function returns the number of characters in the initial
24       segment of s which consist only of characters from accept.
25
26       The strcspn() function returns the number of characters in the  initial
27       segment of s which are not in the string reject.
28

CONFORMING TO

30       SVr4, 4.3BSD, C89, C99.
31

SEE ALSO

33       index(3),   memchr(3),  rindex(3),  strchr(3),  strpbrk(3),  strsep(3),
34       strstr(3), strtok(3), wcscspn(3), wcsspn(3)
35

COLOPHON

37       This page is part of release 3.22 of the Linux  man-pages  project.   A
38       description  of  the project, and information about reporting bugs, can
39       be found at http://www.kernel.org/doc/man-pages/.
40
41
42
43                                  1993-04-12                         STRSPN(3)
Impressum