Added binary and unicode file i/o support to msvcrt.
[reactos.git] / reactos / lib / crtdll / string / strrchr.c
1 /* Copyright (C) 1996 DJ Delorie, see COPYING.DJ for details */
2 /* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
3 #include <msvcrt/string.h>
4
5 char *
6 strrchr(const char *s, int c)
7 {
8 char cc = c;
9 const char *sp=(char *)0;
10 while (*s)
11 {
12 if (*s == cc)
13 sp = s;
14 s++;
15 }
16 if (cc == 0)
17 sp = s;
18 return (char *)sp;
19 }
20