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