Unix and Linux Discussions Tagged with substring |
|
Thread / Thread Starter |
Last Post |
Replies |
Views |
Forum |
|
|
|
5 |
4,139 |
UNIX for Beginners Questions & Answers |
|
|
|
3 |
8,695 |
Shell Programming and Scripting |
|
|
|
6 |
9,965 |
UNIX for Beginners Questions & Answers |
|
|
|
3 |
2,564 |
UNIX for Beginners Questions & Answers |
|
|
|
6 |
10,070 |
Shell Programming and Scripting |
|
|
|
6 |
10,537 |
Shell Programming and Scripting |
|
|
|
3 |
4,389 |
UNIX for Beginners Questions & Answers |
|
|
|
2 |
4,809 |
UNIX for Beginners Questions & Answers |
|
|
|
2 |
2,629 |
UNIX for Beginners Questions & Answers |
|
|
|
3 |
3,031 |
UNIX for Beginners Questions & Answers |
|
|
|
4 |
4,233 |
Shell Programming and Scripting |
|
|
|
14 |
10,069 |
Shell Programming and Scripting |
|
|
|
1 |
1,849 |
Shell Programming and Scripting |
|
|
|
7 |
4,475 |
UNIX for Dummies Questions & Answers |
|
|
|
32 |
9,796 |
Shell Programming and Scripting |
|
|
|
2 |
12,484 |
Shell Programming and Scripting |
|
|
|
4 |
1,637 |
Shell Programming and Scripting |
|
|
|
3 |
3,235 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
8,819 |
Shell Programming and Scripting |
|
|
|
2 |
19,718 |
UNIX for Dummies Questions & Answers |
|
|
|
4 |
8,974 |
Solaris |
|
|
|
4 |
3,903 |
Programming |
|
|
|
5 |
12,532 |
UNIX for Dummies Questions & Answers |
|
|
|
20 |
25,638 |
Shell Programming and Scripting |
|
|
|
8 |
8,700 |
Linux |
|
|
|
11 |
6,350 |
Shell Programming and Scripting |
|
|
|
9 |
15,599 |
Shell Programming and Scripting |
|
|
|
0 |
2,209 |
Shell Programming and Scripting |
|
|
|
8 |
37,199 |
Shell Programming and Scripting |
|
|
|
7 |
16,357 |
Shell Programming and Scripting |
|
|
|
1 |
4,491 |
Shell Programming and Scripting |
|
|
|
11 |
4,337 |
Shell Programming and Scripting |
|
|
|
2 |
8,400 |
UNIX for Dummies Questions & Answers |
|
|
|
4 |
15,597 |
Shell Programming and Scripting |
|
|
|
2 |
2,786 |
Shell Programming and Scripting |
|
|
|
1 |
9,407 |
Shell Programming and Scripting |
|
|
|
1 |
4,080 |
UNIX for Dummies Questions & Answers |
|
|
|
1 |
3,015 |
Shell Programming and Scripting |
|
|
|
25 |
8,095 |
Shell Programming and Scripting |
|
|
|
3 |
7,442 |
Shell Programming and Scripting |
MEMMEM(3) Linux Programmer's Manual MEMMEM(3)
NAME
memmem - locate a substring
SYNOPSIS
#define _GNU_SOURCE /* See feature_test_macros(7) */
#include <string.h>
void *memmem(const void *haystack, size_t haystacklen,
const void *needle, size_t needlelen);
DESCRIPTION
The memmem() function finds the start of the first occurrence of the substring needle of length needlelen in the memory area haystack of
length haystacklen.
RETURN VALUE
The memmem() function returns a pointer to the beginning of the substring, or NULL if the substring is not found.
ATTRIBUTES
For an explanation of the terms used in this section, see attributes(7).
+----------+---------------+---------+
|Interface | Attribute | Value |
+----------+---------------+---------+
|memmem() | Thread safety | MT-Safe |
+----------+---------------+---------+
CONFORMING TO
This function is not specified in POSIX.1, but is present on a number of other systems.
BUGS
In glibc 2.0, if needle is empty, memmem() returns a pointer to the last byte of haystack. This is fixed in glibc 2.1.
SEE ALSO
bstring(3), strstr(3)
COLOPHON
This page is part of release 4.15 of the Linux man-pages project. A description of the project, information about reporting bugs, and the
latest version of this page, can be found at https://www.kernel.org/doc/man-pages/.
GNU
2017-03-13 MEMMEM(3)