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