shithub: scc

ref: 3367504a83d695f670edea4382b87b1ba17f7893
dir: /src/libc/string/strchr.c/

View raw version
#include <string.h>
#undef strchr

char *
strchr(const char *s, int c)
{
	while (*s && *s != c)
		++s;
	return (*s == c) ? (char *)s : NULL;
}