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