shithub: scc

ref: 6853b1e9d0763d49d00264f9c1cd3edc25c3299b
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;
}