xref: /original-bsd/usr.bin/uucp/port/strpbrk.c (revision c3e32dec)
1 /*-
2  * Copyright (c) 1985, 1993
3  *	The Regents of the University of California.  All rights reserved.
4  *
5  * %sccs.include.proprietary.c%
6  */
7 
8 #ifndef lint
9 static char sccsid[] = "@(#)strpbrk.c	8.1 (Berkeley) 06/06/93";
10 #endif /* not lint */
11 
12 /*LINTLIBRARY*/
13 
14 /*
15  * this is like index, but takes a string as the second argument
16  */
17 char *
18 strpbrk(str, chars)
19 register char *str, *chars;
20 {
21 	register char *cp;
22 
23 	do {
24 		cp = chars - 1;
25 		while (*++cp) {
26 			if (*str == *cp)
27 				return str;
28 		}
29 	} while (*str++);
30 	return (char *)0;
31 }
32