diff options
Diffstat (limited to 'system/lib/libc/musl/src/string/strchr.c')
-rw-r--r-- | system/lib/libc/musl/src/string/strchr.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/system/lib/libc/musl/src/string/strchr.c b/system/lib/libc/musl/src/string/strchr.c new file mode 100644 index 00000000..bfae8f9f --- /dev/null +++ b/system/lib/libc/musl/src/string/strchr.c @@ -0,0 +1,9 @@ +#include <string.h> + +char *__strchrnul(const char *, int); + +char *strchr(const char *s, int c) +{ + char *r = __strchrnul(s, c); + return *(unsigned char *)r == (unsigned char)c ? r : 0; +} |