/* Copyright 2022-2023 Gabriel Jensen. This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at . */ #include void * zp_memsrh(void const * const bufptr,char unsigned const val,zp_siz const num) { char unsigned const * buf = bufptr; char unsigned const * const stp = buf+num; while (buf != stp) { char unsigned const * const addr = buf++; zp_ulik (*addr == val) {return (char unsigned *)addr;} } return zp_nulptr; }