ref: 28bcaf2f4432e8d4ec3b224cf99cf4a19c60bb1a dir: /lib/c/src/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; }