

strrchr()                String Function                strrchr()




Search for rightmost occurrence of a character in a string

#include <string.h>
cchhaarr *ssttrrrrcchhrr(_s_t_r_i_n_g, _c_h_a_r_a_c_t_e_r);
cchhaarr *_s_t_r_i_n_g; iinntt _c_h_a_r_a_c_t_e_r;

strrchr looks for the last, or rightmost, occurrence of character
within  string.   character is  declared  to be  an  int, but  is
handled within  the function as a char.   Another way to describe
this function is  to say that it performs a  reverse search for a
character in a string.  It is equivalent to the COHERENT function
rriinnddeexx.

strrchr returns a  pointer to the rightmost occurrence of charac-
ter, or NULL if character could not be found within string.

***** See Also *****

rindex(), string functions, string.h





































COHERENT Lexicon                                           Page 1


