#include <string.h> cchhaarr **iinnddeexx((_s_t_r_i_n_g,, _c)) cchhaarr **_s_t_r_i_n_g;; cchhaarr _c;;index() scans the given string for the first occurrence of the character c. If c is found, index() returns a pointer to it. If it is not found, index() returns NULL.
Note that having iinnddeexx(()) search for a NUL character will always produce a pointer to the end of a string. For example,
char *string;
assert(index(string, 0)==string+strlen(string));
will never fail.
A index() is now obsolete. You should use strchr() instead.