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