shithub: scc

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