ref: 8eae1d47c3534a3ce3902a8895e80dbb4f90375a dir: /lib/c/string/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; }