blob: 6c5b6cbbae78b8fd610a1350a5a7179e3b02aee2 [file] [log] [blame]
/*
* strrchr.c
*/
#include <string.h>
#include <klibc/compiler.h>
char *strrchr(const char *s, int c)
{
const char *found = NULL;
while ( *s ) {
if ( *s == (char) c )
found = s;
s++;
}
return (char *)found;
}
__ALIAS(char *, rindex, (const char *, int), strrchr)