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