shithub: scc

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