shithub: scc

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