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