mailing list of musl libc
 help / color / mirror / code / Atom feed
b5e21f7040bb3d9d82fb9b71a76ab80af4ab115b blob 273 bytes (raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
 
#include <ctype.h>
#include <string.h>

char *strcasestr(const char *h, const char *n)
{
	size_t i, l = strlen(n);
	for (; *h; h++) {
		for (i = 0; i < l && tolower((unsigned char)n[i]) == tolower((unsigned char)h[i]); ++i);
		if (i == l) return (char *)h;
	}
	return 0;
}
debug log:

solving b5e21f70 ...
found b5e21f70 in https://inbox.vuxu.org/musl/20220702230931.rdlokxbui5tfliog@gen2.localdomain/
found af109f36 in https://git.vuxu.org/mirror/musl/
preparing index
index prepared:
100644 af109f3611bd4d917fc9311308006b867bcd8780	src/string/strcasestr.c

applying [1/1] https://inbox.vuxu.org/musl/20220702230931.rdlokxbui5tfliog@gen2.localdomain/
diff --git a/src/string/strcasestr.c b/src/string/strcasestr.c
index af109f36..b5e21f70 100644

Checking patch src/string/strcasestr.c...
Applied patch src/string/strcasestr.c cleanly.

index at:
100644 b5e21f7040bb3d9d82fb9b71a76ab80af4ab115b	src/string/strcasestr.c

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).