MEMMEM(3) | Library Functions Manual | MEMMEM(3) |
memmem
— locate a
byte substring in a byte string
#include
<string.h>
void *
memmem
(const void *big,
size_t big_len, const void
*little, size_t little_len);
The memmem
() function locates the first
occurrence of the byte string little in the byte
string big.
If little is zero length,
big is returned; if little
occurs nowhere in big, NULL
is
returned; otherwise a pointer to the first character of the first occurrence
of little is returned.
memmem
() is a GNU extension.
The memmem
() function first appeared in
OpenBSD 5.4.
Pascal Gloor <pascal.gloor@spale.com>
July 16, 2013 | OpenBSD-current |