ref: 5d8b5ae1ef2dd2b2e33e2683968dc62ce25a3cac 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; }