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