ref: 1fa53aab19efe6ccd1b521574a71fb6ce0e0f126 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; }