memmem.3 (267774) | memmem.3 (283584) |
---|---|
1.\" Copyright (c) 2005 Pascal Gloor <pascal.gloor@spale.com> 2.\" 3.\" Redistribution and use in source and binary forms, with or without 4.\" modification, are permitted provided that the following conditions 5.\" are met: 6.\" 1. Redistributions of source code must retain the above copyright 7.\" notice, this list of conditions and the following disclaimer. 8.\" 2. Redistributions in binary form must reproduce the above copyright --- 10 unchanged lines hidden (view full) --- 19.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25.\" SUCH DAMAGE. 26.\" | 1.\" Copyright (c) 2005 Pascal Gloor <pascal.gloor@spale.com> 2.\" 3.\" Redistribution and use in source and binary forms, with or without 4.\" modification, are permitted provided that the following conditions 5.\" are met: 6.\" 1. Redistributions of source code must retain the above copyright 7.\" notice, this list of conditions and the following disclaimer. 8.\" 2. Redistributions in binary form must reproduce the above copyright --- 10 unchanged lines hidden (view full) --- 19.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25.\" SUCH DAMAGE. 26.\" |
27.\" $FreeBSD: head/lib/libc/string/memmem.3 267774 2014-06-23 08:25:03Z bapt $ | 27.\" $FreeBSD: head/lib/libc/string/memmem.3 283584 2015-05-26 21:16:07Z emaste $ |
28.\" | 28.\" |
29.Dd August 24, 2005 | 29.Dd May 26, 2015 |
30.Dt MEMMEM 3 31.Os 32.Sh NAME 33.Nm memmem 34.Nd "locate a byte substring in a byte string" 35.Sh LIBRARY 36.Lb libc 37.Sh SYNOPSIS --- 8 unchanged lines hidden (view full) --- 46.Fn memmem 47function 48locates the first occurrence of the byte string 49.Fa little 50in the byte string 51.Fa big . 52.Sh RETURN VALUES 53If | 30.Dt MEMMEM 3 31.Os 32.Sh NAME 33.Nm memmem 34.Nd "locate a byte substring in a byte string" 35.Sh LIBRARY 36.Lb libc 37.Sh SYNOPSIS --- 8 unchanged lines hidden (view full) --- 46.Fn memmem 47function 48locates the first occurrence of the byte string 49.Fa little 50in the byte string 51.Fa big . 52.Sh RETURN VALUES 53If |
54.Fa big_len 55is smaller than 56.Fa little_len , 57if | |
58.Fa little_len | 54.Fa little_len |
59is 0, if 60.Fa big_len 61is 0 or if | 55is zero 56.Fa big 57is returned (that is, an empty little is deemed to match at the beginning of 58big); 59if |
62.Fa little 63occurs nowhere in 64.Fa big , 65.Dv NULL 66is returned; 67otherwise a pointer to the first character of the first occurrence of 68.Fa little 69is returned. --- 9 unchanged lines hidden (view full) --- 79.Fn memmem 80function first appeared in 81.Fx 6.0 . 82.Sh AUTHORS 83.An Pascal Gloor Aq Mt pascal.gloor@spale.com 84.Sh BUGS 85This function was broken in Linux libc up to and including version 5.0.9 86and in GNU libc prior to version 2.1. | 60.Fa little 61occurs nowhere in 62.Fa big , 63.Dv NULL 64is returned; 65otherwise a pointer to the first character of the first occurrence of 66.Fa little 67is returned. --- 9 unchanged lines hidden (view full) --- 77.Fn memmem 78function first appeared in 79.Fx 6.0 . 80.Sh AUTHORS 81.An Pascal Gloor Aq Mt pascal.gloor@spale.com 82.Sh BUGS 83This function was broken in Linux libc up to and including version 5.0.9 84and in GNU libc prior to version 2.1. |
85Prior to 86.Fx 11.0 87.Nm 88returned 89.Dv NULL 90when 91.Fa little_len 92equals 0. |
|