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