char *index(const char *s, int c);
char *rindex(const char *s, int c);
returns a pointer to the first occurrence of the character c
in the string s
rindex returns a pointer to the last occurrence of the character c in the string s.
Both return null if no occurence was found.
Not much to say here, is there? It's just a meat and potatoes
, code consolidation
function. See str functions
for some more interesting functions.