summaryrefslogtreecommitdiff
path: root/com32/lib/strrchr.c
blob: a7d2fee78ffb6d1913a09220bd190e341081ce44 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/*
 * strrchr.c
 */

#include <string.h>

char *strrchr(const char *s, int c)
{
    const char *found = NULL;

    while (*s) {
	if (*s == (char)c)
	    found = s;
	s++;
    }

    return (char *)found;
}