BSD 4_4 release
[unix-history] / usr / src / usr.bin / uucp / port / strpbrk.c
CommitLineData
f49909f5 1/*-
ad787160
C
2 * Copyright (c) 1985, 1993
3 * The Regents of the University of California. All rights reserved.
f49909f5 4 *
ad787160
C
5 * This module is believed to contain source code proprietary to AT&T.
6 * Use and redistribution is subject to the Berkeley Software License
7 * Agreement and your Software Agreement with AT&T (Western Electric).
f49909f5
KB
8 */
9
a61c2fd2 10#ifndef lint
ad787160 11static char sccsid[] = "@(#)strpbrk.c 8.1 (Berkeley) 6/6/93";
f49909f5 12#endif /* not lint */
a61c2fd2
JB
13
14/*LINTLIBRARY*/
15
16/*
17 * this is like index, but takes a string as the second argument
18 */
19char *
20strpbrk(str, chars)
21register char *str, *chars;
22{
23 register char *cp;
24
25 do {
26 cp = chars - 1;
27 while (*++cp) {
28 if (*str == *cp)
29 return str;
30 }
31 } while (*str++);
32 return (char *)0;
33}