diff options
Diffstat (limited to 'com32/lib/strchr.c')
-rw-r--r-- | com32/lib/strchr.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/com32/lib/strchr.c b/com32/lib/strchr.c new file mode 100644 index 0000000..cd3ec78 --- /dev/null +++ b/com32/lib/strchr.c @@ -0,0 +1,16 @@ +/* + * strchr.c + */ + +#include <string.h> + +char *strchr(const char *s, int c) +{ + while (*s != (char)c) { + if (!*s) + return NULL; + s++; + } + + return (char *)s; +} |