mailing list of musl libc
 help / color / mirror / code / Atom feed
090b78fd7d7fa23ee591d02a24c4e83a5f70310a blob 268 bytes (raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
 
#define _GNU_SOURCE
#include <string.h>

char *strcasestr(const char *h, const char *n)
{
	const size_t nl= strlen(n);

	h = strchrnul(h, *n);

	if (!*n) return (char *)h;

	for (; *h && strncasecmp(h, n, nl); h = strchrnul(h + 1, *n));

	return *h ? (char *)h : 0;
}
debug log:

solving 090b78fd ...
found 090b78fd in https://inbox.vuxu.org/musl/20170715195541.3136-5-nwmcsween@gmail.com/
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/20170715195541.3136-5-nwmcsween@gmail.com/
diff --git a/src/string/strcasestr.c b/src/string/strcasestr.c
index af109f36..090b78fd 100644

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

index at:
100644 090b78fd7d7fa23ee591d02a24c4e83a5f70310a	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).