home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / vol_100 / 163_01 / rindex.c < prev   
Text File  |  1988-01-31  |  384b  |  13 lines

  1. /*
  2. ** return pointer to the last occurrence of c in s
  3. */
  4. rindex(s, c) char *s, c; {
  5.   char *rindex;
  6.   rindex = 0;
  7.   while(*s) {
  8.     if(*s == c) rindex = s;
  9.     s++;
  10.     }
  11.   return rindex;
  12.   }
  13.