ref: 87b202a67e2d27f83702b4c353f8f66bc8d8056a dir: /lib/c/strrchr.c/
#include <string.h> #undef strrchr char * strrchr(const char *s, int c) { const char *t = s; while (*t) ++t; while (t > s && *t != c) --t; return (*t == c) ? (char *)t : NULL; }