wcsrchr.c - scc - simple c99 compiler
(HTM) git clone git://git.simple-cc.org/scc
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) Submodules
(DIR) README
(DIR) LICENSE
---
wcsrchr.c (203B)
---
1 #include <wchar.h>
2
3 #undef wcsrchr
4
5 wchar_t *
6 wcsrchr(const wchar_t *s, wchar_t c)
7 {
8 wchar_t *t;
9
10 for (t = (wchar_t *) s; *t; ++t)
11 ;
12 while (t > s && *t != c)
13 --t;
14
15 return (*t == c) ? t : NULL;
16 }