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