|| FreeBSD Library Functions Manual
locate a byte substring in a byte string
Standard C Library (libc, -lc)
#include < string.h>
memmem( const void *big, size_t big_len, const void *little, size_t little_len);
memmem() function locates the first occurrence of the byte string
little in the byte string
RETURN VALUES If
big_len is smaller than
little_len is 0, if
big_len is 0 or if
little occurs nowhere in
NULL is returned; otherwise a pointer to the first character of the first occurrence of
little is returned.
memmem() is a GNU extension.
memmem() function first appeared in
BUGS This function was broken in Linux libc up to and including version 5.0.9 and in GNU libc prior to version 2.1.