English pages are provided only to compare translations to original pages,
better looking pages can be browsed
at the Linux man-pages official site.
Linux Programmer's Manual (3)
memmem - locate a substring
#define _GNU_SOURCE /* See feature_test_macros(7) */
void *memmem(const void *haystack, size_t haystacklen,
const void *needle, size_t needlelen);
function finds the start of the first occurrence
of the substring
in the memory
function returns a pointer to the beginning of the
substring, or NULL if the substring is not found.
Multithreading (see pthreads(7))
function is thread-safe.
This function is a GNU extension.
This function was broken in Linux libraries up to and including libc 5.0.9;
arguments were interchanged,
and a pointer to the end of the first occurrence of
Both old and new libc's have the bug that if
And glibc 2.0 makes it worse, returning a pointer to the
last byte of
This is fixed in glibc 2.1.
This page is part of release 3.66 of the Linux
A description of the project,
information about reporting bugs,
and the latest version of this page,
can be found at
- RETURN VALUE
- Multithreading (see pthreads(7))
- CONFORMING TO
- SEE ALSO
This document was created by
using the manual pages.
Time: 21:43:01 GMT, July 12, 2014