aboutsummaryrefslogtreecommitdiff
path: root/system/lib/libc/musl/src/string/strcasestr.c
blob: af109f3611bd4d917fc9311308006b867bcd8780 (plain)
1
2
3
4
5
6
7
8
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;
}