xref: /csrg-svn/usr.bin/uucp/port/strpbrk.c (revision 62391)
148654Sbostic /*-
2*62391Sbostic  * Copyright (c) 1985, 1993
3*62391Sbostic  *	The Regents of the University of California.  All rights reserved.
448654Sbostic  *
548654Sbostic  * %sccs.include.proprietary.c%
648654Sbostic  */
748654Sbostic 
823708Sbloom #ifndef lint
9*62391Sbostic static char sccsid[] = "@(#)strpbrk.c	8.1 (Berkeley) 06/06/93";
1048654Sbostic #endif /* not lint */
1123708Sbloom 
1223708Sbloom /*LINTLIBRARY*/
1323708Sbloom 
1423708Sbloom /*
1523708Sbloom  * this is like index, but takes a string as the second argument
1623708Sbloom  */
1723708Sbloom char *
strpbrk(str,chars)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