shithub: scc

ref: 4212f8a3ecf712dbf89c9449336bc5b3d9f2aaed
dir: /lib/c/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;
}