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