1 /* CC0 (Public domain) - see LICENSE file for details */
4 #include <ccan/memmem/memmem.h>
7 void *memmem(const void *haystack, size_t haystacklen,
8 const void *needle, size_t needlelen)
12 if (needlelen > haystacklen)
18 (p + needlelen) <= (haystack + haystacklen);
20 if (memcmp(p, needle, needlelen) == 0)