|
|
1.1 ! root 1: #ifndef lint ! 2: static char sccsid[] = "@(#)strpbrk.c 5.1 (Berkeley) 6/23/85"; ! 3: #endif ! 4: ! 5: /*LINTLIBRARY*/ ! 6: ! 7: /* ! 8: * this is like index, but takes a string as the second argument ! 9: */ ! 10: char * ! 11: strpbrk(str, chars) ! 12: register char *str, *chars; ! 13: { ! 14: register char *cp; ! 15: ! 16: do { ! 17: cp = chars - 1; ! 18: while (*++cp) { ! 19: if (*str == *cp) ! 20: return str; ! 21: } ! 22: } while (*str++); ! 23: return (char *)0; ! 24: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.