#include char *strrchr(const char *s, int c) { /* include null term */ long sz = strlen(s) + 1; for (long i = sz; i >= 0; i--) { if (s[i] == c) { return (char *)(s + i); } } return NULL; }