Commit | Line | Data |
---|---|---|
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 | 11 | static 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 | */ | |
19 | char * | |
20 | strpbrk(str, chars) | |
21 | register 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 | } |