diff --git a/src/string/strchr.c b/src/string/strchr.c new file mode 100644 index 0000000..e06e9f1 --- /dev/null +++ b/src/string/strchr.c @@ -0,0 +1,14 @@ + + +char *strchr(const char *str, int c) +{ + const char *start = str; + + while (*start) + { + if (*start == c) + return start; + start++; + } + return NULL; +}