iinnddeexx() -- String Function (libc)

Find a character in a string
#iinncclluuddee <ssttrriinngg.hh>
cchhaarr *iinnddeexx(_s_t_r_i_n_g, _c) cchhaarr *_s_t_r_i_n_g; cchhaarr _c;

iinnddeexx() scans the given _s_t_r_i_n_g for the first occurrence of the character _c.
If  _c is  found, iinnddeexx()  returns a  pointer to  it.  If  it is  not found,
iinnddeexx() returns NULL.

Note that having  iinnddeexx() 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.

_E_x_a_m_p_l_e
For an example of this function, see the entry for ssttrrnnccppyy().

_S_e_e _A_l_s_o
lliibbcc, ppnnmmaattcchh(), ssttrrcchhrr(), ssttrriinngg.hh, ssttrrrrcchhrr(), ssttrriinngg.hh

_N_o_t_e_s
You _m_u_s_t include header file ssttrriinngg.hh  in any program that uses iinnddeexx(), or
that program will not link correctly.

iinnddeexx() is now obsolete.  You should use ssttrrcchhrr() instead.
