blob: a7d2fee78ffb6d1913a09220bd190e341081ce44 [file] [log] [blame]
Greg Hartman76d05dc2016-11-23 15:51:27 -08001/*
2 * strrchr.c
3 */
4
5#include <string.h>
6
7char *strrchr(const char *s, int c)
8{
9 const char *found = NULL;
10
11 while (*s) {
12 if (*s == (char)c)
13 found = s;
14 s++;
15 }
16
17 return (char *)found;
18}