ref: c85bc69f741a003f6ebccdae4168a8527c775823
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;
}