blob: 863e5ca050427687709712552930b59ffb4a490f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
#include <stddef.h> // for NULL
#include <string.h> // for strrchr
char *strrchr(const char *s, int c)
{
const char *last = NULL;
while (*s != '\0') {
if (*s == c)
last = s;
s++;
}
return (char *)last;
}
|