|
|
1.1 root 1: /*
2: * Determine the leftmost index of the character
3: * in the string.
4: */
5:
6: char *
7: index(str, ch)
8: char *str;
9: {
10: register char *cp;
11: register int c;
12:
13: for (c = ch, cp = str; *cp; cp++)
14: if (*cp == c)
15: return(cp);
16: return(NOSTR);
17: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.