shithub: scc

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