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

NAME

6       strspn, strcspn - search a string for a set of bytes
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 (in bytes) of the initial
17       segment of s which consists entirely of bytes in accept.
18
19       The strcspn() function calculates the length of the initial segment  of
20       s which consists entirely of bytes not in reject.
21

RETURN VALUE

23       The  strspn()  function returns the number of bytes in the initial seg‐
24       ment of s which consist only of bytes from accept.
25
26       The strcspn() function returns the number of bytes in the initial  seg‐
27       ment 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),  string(3),  strpbrk(3),
34       strsep(3), strstr(3), strtok(3), wcscspn(3), wcsspn(3)
35

COLOPHON

37       This page is part of release 3.53 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                                  2012-05-10                         STRSPN(3)
Impressum