2 @subsection @code{memmem}
5 LSB specification:@* @url{https://refspecs.linuxbase.org/LSB_5.0.0/LSB-Core-generic/LSB-Core-generic/baselib-memmem-3.html}
11 @ref{Search Functions,,Search Functions,libc},
14 @url{https://www.gnu.org/software/libc/manual/html_node/Search-Functions.html},
17 @uref{https://www.kernel.org/doc/man-pages/online/pages/man3/memmem.3.html,,man memmem}.
20 Gnulib module: memmem or memmem-simple
22 Both modules implement the same replacement for the @code{memmem} function
23 with the @code{memmem} module providing a replacement on more platforms where
24 the existing @code{memmem} function has a quadratic worst-case complexity.
26 Portability problems fixed by either Gnulib module @code{memmem-simple}
30 This function is missing on some platforms:
31 Mac OS X 10.5, FreeBSD 5.2.1, OpenBSD 4.0, Minix 3.1.8, HP-UX 11, IRIX 6.5, Solaris 10, mingw, MSVC 14.
33 This function has reversed arguments on some older platforms:
36 This function can trigger false positives for long periodic needles on
38 glibc 2.12, Cygwin 1.7.7.
41 This function returns incorrect values in some cases, such as when
42 given an empty needle:
43 glibc <= 2.0, Solaris 11.4, Cygwin 1.5.x.
46 Performance problems fixed by Gnulib module @code{memmem}:
49 This function has quadratic instead of linear worst-case complexity on some
51 glibc 2.8, FreeBSD 6.2, NetBSD 9.0, AIX 5.1, Solaris 11.4, Cygwin 1.5.x.
52 Note for small needles the replacement may be slower.
55 Portability problems not fixed by Gnulib: