strchr.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
---
strchr.c (146B)
---
1 #include <string.h>
2
3 #undef strchr
4
5 char *
6 strchr(const char *s, int c)
7 {
8 while (*s && *s != c)
9 ++s;
10
11 return (*s == c) ? (char *) s : NULL;
12 }