shithub: scc

ref: 7f6626e8c56822f2294ab095b4c23b8244539b6b
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) ? s : NULL;
}