ref: c35217a1a61f795d312eede2f84faf59c7c06a3c dir: /lib/c/strchr.c/
#include <string.h> #undef strchr char * strchr(const char *s, int c) { while (*s && *s != c) ++s; return (*s == c) ? (char *)s : NULL; }