Files
musl/src/string/strrchr.c

10 lines
163 B
C
Raw Normal View History

2011-02-12 00:22:29 -05:00
#include <string.h>
char *strrchr(const char *s, int c)
{
const char *p;
c = (char)c;
for (p=s+strlen(s); p>=s && *p!=c; p--);
return p>=s ? (char *)p : 0;
}