blob: eaf4004b6fb09bf05a8acf0fc124d176aee17feb (
plain)
1
2
3
4
5
6
7
8
|
#include <stddef.h>
char *rstrchr(const char *s, char *start, char c) {
char *ret = start;
while ((ret > s) && (*ret != c)) ret--;
if ((s == ret) && (*s != c)) return NULL;
else return ret;
}
|