/* * Given a string (s) and a character (c), returns pointer to the * first occurrence of c in s. Returns 0 if c doesn't exist in s. */ char * strchr(s,c) register char *s; register char c; { do { if ( *s == c ) return(s); } while ( *s++ ); return((char *)0); }