diff options
Diffstat (limited to 'libc-top-half/musl/src/string/strcasestr.c')
-rw-r--r-- | libc-top-half/musl/src/string/strcasestr.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libc-top-half/musl/src/string/strcasestr.c b/libc-top-half/musl/src/string/strcasestr.c new file mode 100644 index 0000000..af109f3 --- /dev/null +++ b/libc-top-half/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; +} |