xref: /original-bsd/usr.bin/uucp/port/strpbrk.c (revision 2301fdfb)
1 #ifndef lint
2 static char sccsid[] = "@(#)strpbrk.c	5.1 (Berkeley) 06/23/85";
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 }
25