COHERENT manpages
This page displays the COHERENT manpage for strspn() [Return length a string includes characters in another].
List of available manpages
Index
strspn() -- String Function (libc)
Return length a string includes characters in another
#include <string.h>
unsigned int strspn(string1, string2)
char *string1; char *string2;
strspn() returns the length for which string1 initially consists only of
characters that are found in string2. For example,
char *s1 = "hello, world";
char *s2 = "kernighan & ritchie";
strcspn(s1, s2);
returns two, which is the length for which the first string initially
consists of characters found in the second.
See Also
libc,
string.h
ANSI Standard, §7.11.5.6
POSIX Standard, §8.1