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