shithub: scc

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