strrchr.c (188B)
1 #include <string.h> 2 #undef strrchr 3 4 char * 5 strrchr(const char *s, int c) 6 { 7 const char *t = s; 8 9 while (*t) 10 ++t; 11 while (t > s && *t != c) 12 --t; 13 return (*t == c) ? (char *)t : NULL; 14 }
sccsimple C compiler | |
git clone git://git.2f30.org/scc | |
Log | Files | Refs | README | LICENSE |