Mirror of :pserver:cvs@cvs.fefe.de:/cvs libowfat https://www.fefe.de/libowfat/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

15 lines
393 B

  1. #include "str.h"
  2. unsigned long str_rchr(const char *in, char needle) {
  3. register const char* t=in;
  4. register const char c=needle;
  5. register const char* found=0;
  6. for (;;) {
  7. if (!*t) break; if (*t==c) found=t; ++t;
  8. if (!*t) break; if (*t==c) found=t; ++t;
  9. if (!*t) break; if (*t==c) found=t; ++t;
  10. if (!*t) break; if (*t==c) found=t; ++t;
  11. }
  12. return (found?found:t)-in;
  13. }