ref: 9cdf8d4b4c9ecf24e8e065fdbf9a6aea48d5f4af 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; }