|
|
BSD 4.1
/*
* Determine the leftmost index of the character
* in the string.
*/
char *
index(str, ch)
char *str;
{
register char *cp;
register int c;
for (c = ch, cp = str; *cp; cp++)
if (*cp == c)
return(cp);
return(NOSTR);
}
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.