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