shithub: scc

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