shithub: scc

ref: 08a32f26c08c322c5549b94c05032d2e87f1df3c
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) ? s : NULL;
}