strcasestr.c\string\src - musl - musl - an implementation of the standard library for Linux-based systems

index : musl
musl - an implementation of the standard library for Linux-based systems
summary refs log tree commit diff
path: root/src/string/strcasestr.c
blob: dc598bc388f71ec272b86d6b4fcc341537792632 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
#define _GNU_SOURCE
#include <string.h>
char *strcasestr(const char *h, const char *n)
{
	size_t l = strlen(n);
	if (!l) return (char *)h;
	for (; *h; h++) if (!strncasecmp(h, n, l)) return (char *)h;
	return 0;
}
generated by cgit v1.2.1 (git 2.18.0) at 2025年09月04日 21:11:28 +0000

AltStyle によって変換されたページ (->オリジナル) /