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