shithub: scc

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