shithub: scc

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