shithub: scc

ref: 6b1309ac40e3f1842f42b5fbd995b40dbf8e3932
dir: /src/libc/string/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;
}