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