xref: /csrg-svn/usr.bin/uucp/port/strpbrk.c (revision 48654)
1*48654Sbostic /*-
2*48654Sbostic  * Copyright (c) 1985 The Regents of the University of California.
3*48654Sbostic  * All rights reserved.
4*48654Sbostic  *
5*48654Sbostic  * %sccs.include.proprietary.c%
6*48654Sbostic  */
7*48654Sbostic 
823708Sbloom #ifndef lint
9*48654Sbostic static char sccsid[] = "@(#)strpbrk.c	5.2 (Berkeley) 04/24/91";
10*48654Sbostic #endif /* not lint */
1123708Sbloom 
1223708Sbloom /*LINTLIBRARY*/
1323708Sbloom 
1423708Sbloom /*
1523708Sbloom  * this is like index, but takes a string as the second argument
1623708Sbloom  */
1723708Sbloom char *
1823708Sbloom strpbrk(str, chars)
1923708Sbloom register char *str, *chars;
2023708Sbloom {
2123708Sbloom 	register char *cp;
2223708Sbloom 
2323708Sbloom 	do {
2423708Sbloom 		cp = chars - 1;
2523708Sbloom 		while (*++cp) {
2623708Sbloom 			if (*str == *cp)
2723708Sbloom 				return str;
2823708Sbloom 		}
2923708Sbloom 	} while (*str++);
3023708Sbloom 	return (char *)0;
3123708Sbloom }
32