Unix and Linux Discussions Tagged with substring |
|
Thread / Thread Starter |
Last Post |
Replies |
Views |
Forum |
|
|
|
5 |
3,621 |
UNIX for Beginners Questions & Answers |
|
|
|
3 |
8,582 |
Shell Programming and Scripting |
|
|
|
6 |
9,071 |
UNIX for Beginners Questions & Answers |
|
|
|
3 |
2,110 |
UNIX for Beginners Questions & Answers |
|
|
|
6 |
9,940 |
Shell Programming and Scripting |
|
|
|
6 |
10,317 |
Shell Programming and Scripting |
|
|
|
3 |
3,936 |
UNIX for Beginners Questions & Answers |
|
|
|
2 |
4,391 |
UNIX for Beginners Questions & Answers |
|
|
|
2 |
2,305 |
UNIX for Beginners Questions & Answers |
|
|
|
3 |
2,654 |
UNIX for Beginners Questions & Answers |
|
|
|
4 |
4,149 |
Shell Programming and Scripting |
|
|
|
14 |
9,917 |
Shell Programming and Scripting |
|
|
|
1 |
1,831 |
Shell Programming and Scripting |
|
|
|
7 |
4,400 |
UNIX for Dummies Questions & Answers |
|
|
|
32 |
9,615 |
Shell Programming and Scripting |
|
|
|
2 |
12,398 |
Shell Programming and Scripting |
|
|
|
4 |
1,629 |
Shell Programming and Scripting |
|
|
|
3 |
3,203 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
8,788 |
Shell Programming and Scripting |
|
|
|
2 |
19,675 |
UNIX for Dummies Questions & Answers |
|
|
|
4 |
8,909 |
Solaris |
|
|
|
4 |
3,783 |
Programming |
|
|
|
5 |
12,485 |
UNIX for Dummies Questions & Answers |
|
|
|
20 |
25,557 |
Shell Programming and Scripting |
|
|
|
8 |
8,457 |
Linux |
|
|
|
11 |
6,303 |
Shell Programming and Scripting |
|
|
|
9 |
15,556 |
Shell Programming and Scripting |
|
|
|
0 |
2,195 |
Shell Programming and Scripting |
|
|
|
8 |
37,107 |
Shell Programming and Scripting |
|
|
|
7 |
16,309 |
Shell Programming and Scripting |
|
|
|
1 |
4,456 |
Shell Programming and Scripting |
|
|
|
11 |
4,276 |
Shell Programming and Scripting |
|
|
|
2 |
8,350 |
UNIX for Dummies Questions & Answers |
|
|
|
4 |
15,563 |
Shell Programming and Scripting |
|
|
|
2 |
2,750 |
Shell Programming and Scripting |
|
|
|
1 |
9,353 |
Shell Programming and Scripting |
|
|
|
1 |
4,034 |
UNIX for Dummies Questions & Answers |
|
|
|
1 |
2,988 |
Shell Programming and Scripting |
|
|
|
25 |
8,021 |
Shell Programming and Scripting |
|
|
|
3 |
7,415 |
Shell Programming and Scripting |
STRSTR(3) Linux Programmer's Manual STRSTR(3)
NAME
strstr - locate a substring
SYNOPSIS
#include <string.h>
char *strstr(const char *haystack, const char *needle);
DESCRIPTION
The strstr() function finds the first occurrence of the substring needle in the string haystack. The terminating ` ' characters are not
compared.
RETURN VALUE
The strstr() function returns a pointer to the beginning of the substring, or NULL if the substring is not found.
BUGS
Early versions of Linux libc (like 4.5.26) would not allow an empty argument. Later versions (like 4.6.27) work correctly, and return
haystack when needle is empty.
CONFORMING TO
ISO 9899
SEE ALSO
index(3), memchr(3), rindex(3), strchr(3), strpbrk(3), strsep(3), strspn(3), strtok(3)
GNU
1993-04-12 STRSTR(3)