MEMMEM(3) NetBSD Library Functions Manual MEMMEM(3)
NAME
memmem -- locate substring in byte string
LIBRARY
Standard C Library (libc, -lc)
SYNOPSIS
#include <string.h> void * memmem(const void *block, size_t blen, const void *pat, size_t plen);
DESCRIPTION
The memmem() function locates the first occurrence of the binary string pat of size plen bytes in the byte string block of size blen bytes.
RETURN VALUES
The memmem() function returns a pointer to the substring located, or NULL if no such substring exists within block. If plen is zero, block is returned, i.e. a zero length pat is deemed to match the start of the string, as with strstr(3).
SEE ALSO
bm(3), memchr(3), strchr(3), strstr(3)
STANDARDS
The memmem function conforms to IEEE Std 1003.1-2024 (``POSIX.1'').
HISTORY
memmem() first appeared in the Free Software Foundation's glibc library. NetBSD 10.99 November 1, 2024 NetBSD 10.99
Powered by man-cgi (2024-08-26). Maintained for NetBSD by Kimmo Suominen. Based on man-cgi by Panagiotis Christias.