Commit | Line | Data |
---|---|---|
a61c2fd2 JB |
1 | #ifndef lint |
2 | static char sccsid[] = "@(#)strpbrk.c 5.1 (Berkeley) %G%"; | |
3 | #endif | |
4 | ||
5 | /*LINTLIBRARY*/ | |
6 | ||
7 | /* | |
8 | * this is like index, but takes a string as the second argument | |
9 | */ | |
10 | char * | |
11 | strpbrk(str, chars) | |
12 | register char *str, *chars; | |
13 | { | |
14 | register char *cp; | |
15 | ||
16 | do { | |
17 | cp = chars - 1; | |
18 | while (*++cp) { | |
19 | if (*str == *cp) | |
20 | return str; | |
21 | } | |
22 | } while (*str++); | |
23 | return (char *)0; | |
24 | } |