ref: 4bdc9b0b956344c2c4f1b9a044d386b462f50aca dir: /lib/c/src/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; }