blob: fb5e07028faad66f0ade8679a55ec03407a0a1ef (
plain)
1
2
3
4
5
6
7
8
9
10
|
#include <stddef.h>
char *rstrchr(const char *, char *, char);
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;
}
|