/* SPDX-License-Identifier: MIT */ /* Derived from musl libc (Copyright © 2005-2020 Rich Felker, et al.) */ #include char *strchr(const char *s, int c) { char *r = __strchrnul(s, c); return *(unsigned char *)r == (unsigned char)c ? r : 0; }