MEMMEM(3)

NAME
memmem - locate a substring

SYNOPSIS
#include <string.h>

void *memmem(const void *needle, size_t needlelen,
    const void *haystack, size_t haystacklen);

DESCRIPTION
The memmem() function finds the first occurrence of the substring needle of length needlelen in the memory area haystack of length haystacklen.

RETURN VALUE
The memmem() function returns a pointer to the beginning of the substring, or NULL if the substring is not found.

SEE ALSO
strstr(3)