Subversion Repositories Kolibri OS

Rev

Rev 8793 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

  1. /* Copyright (C) 1996 DJ Delorie, see COPYING.DJ for details */
  2. /* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
  3. #include "unconst.h"
  4. #include <string.h>
  5.  
  6. char* strrchr(const char* s, int c)
  7. {
  8.     char cc = c;
  9.     const char* sp = (char*)0;
  10.     while (*s) {
  11.         if (*s == cc)
  12.             sp = s;
  13.         s++;
  14.     }
  15.     if (cc == 0)
  16.         sp = s;
  17.     return unconst(sp, char*);
  18. }
  19.