ref: 8e212d00e17c23b79489215d6cc41da22381a550 dir: /lib/c/string/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; }