ref: 0c1934dabb9e1f81b8c7c2099f138e17dc772aca dir: /src/libc/string/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; }