shithub: scc

ref: 4c2f877eee5fe2730a7e51fc01861b7169bbbd47
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;
}