aboutsummaryrefslogtreecommitdiff
path: root/system/lib/libc/musl/src/string/strcasestr.c
diff options
context:
space:
mode:
Diffstat (limited to 'system/lib/libc/musl/src/string/strcasestr.c')
-rw-r--r--system/lib/libc/musl/src/string/strcasestr.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/system/lib/libc/musl/src/string/strcasestr.c b/system/lib/libc/musl/src/string/strcasestr.c
new file mode 100644
index 00000000..af109f36
--- /dev/null
+++ b/system/lib/libc/musl/src/string/strcasestr.c
@@ -0,0 +1,9 @@
+#define _GNU_SOURCE
+#include <string.h>
+
+char *strcasestr(const char *h, const char *n)
+{
+ size_t l = strlen(n);
+ for (; *h; h++) if (!strncasecmp(h, n, l)) return (char *)h;
+ return 0;
+}