summaryrefslogtreecommitdiff
path: root/src/user/lib/string.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/user/lib/string.c')
-rw-r--r--src/user/lib/string.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/user/lib/string.c b/src/user/lib/string.c
index 77b996c..92b2e51 100644
--- a/src/user/lib/string.c
+++ b/src/user/lib/string.c
@@ -49,3 +49,11 @@ long strtol(const char *restrict s, char **restrict end, int base) {
if (end) *end = (void*)s;
return res * sign;
}
+
+char *strchr(const char *s, int c) {
+ while (*s) {
+ if (*s == c) return s;
+ s++;
+ }
+ return NULL;
+}