home *** CD-ROM | disk | FTP | other *** search
/ The Fred Fish Collection 1.5 / ffcollection-1-5-1992-11.iso / ff_disks / 200-299 / ff218.lzh / EdLib / strrpbrk.c < prev    next >
C/C++ Source or Header  |  1989-06-04  |  494b  |  22 lines

  1. /*
  2.  * edlib v1.1 Copyright 1989 Edwin Hoogerbeets
  3.  * This code is freely redistributable as long as no charge other than
  4.  * reasonable copying fees are levied for it.
  5.  */
  6.  
  7. #define NULL    0L
  8.  
  9. char *strrpbrk(str, charset)
  10. register char *str, *charset;
  11. {
  12.         register char *temp;
  13.         extern char *index();
  14.  
  15.         temp = str + strlen(str) - 1;
  16.  
  17.         while ( temp != (str - 1)  && !index(charset, *temp) )
  18.                 --temp;
  19.  
  20.         return( (temp != (str - 1)) ? temp : NULL);
  21. }
  22.