* added compilers lcc and bcc (linux86)
[mascara-docs.git] / compilers / linux86-0.16.17 / libc / string / strcspn.c
blob619c8be6b63a08e15f524389586af5896f9bec33
1 /* strcspn.c */
3 /* from Schumacher's Atari library, improved */
5 #include <string.h>
7 size_t strcspn(string, set)
8 register char *string;
9 char *set;
11 * Return the length of the sub-string of <string> that consists
12 * entirely of characters not found in <set>. The terminating '\0'
13 * in <set> is not considered part of the match set. If the first
14 * character if <string> is in <set>, 0 is returned.
17 register char *setptr;
18 char *start;
20 start = string;
21 while (*string)
23 setptr = set;
25 if (*setptr == *string)
26 goto break2;
27 while (*setptr++);
28 ++string;
30 break2:
31 return string - start;