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