strstr [ HP C/iX Library Reference Manual ] MPE/iX 5.0 Documentation
HP C/iX Library Reference Manual
strstr
Locates the first occurrence in one string of the sequence of characters
specified by another string.
Syntax
#include <string.h>
char *strstr(const char *s1, const char *s2);
Parameters
s1 A pointer to the character string to search.
s2 A pointer to the character string with the search value.
Return Values
x A pointer to the string found in s1. If s2 is null, the
value of s1 is returned.
NULL The s2 was not found in s1.
Description
The strstr function scans s1 searching for the first occurrence of the
sequence of characters in s2 (excluding the null character). If s2 is
found in s1, a pointer to the start of that string in s1 is returned.
See Also
strchr(), strrchr(), ANSI C 4.11.5.7, POSIX.1 8.1
MPE/iX 5.0 Documentation