1 /* CC0 (Public domain) - see LICENSE file for details */
6 #include <ccan/memmem/memmem.h>
9 void *memmem(const void *haystack, size_t haystacklen,
10 const void *needle, size_t needlelen)
14 if (needlelen > haystacklen)
20 (p + needlelen) <= ((const char *)haystack + haystacklen);
22 if (memcmp(p, needle, needlelen) == 0)