Guardian C Library Calls Reference Manual

Reference to Library Calls
Guardian TNS C Library Calls Reference Manual128833 3-209
strstr
strstr
The strstr function searches a string for the first occurrence of a given substring.
str
points to the string to search.
substr
points to the substring to search for.
Return Value
points to the first occurrence in *str of *substr. If the string does not contain the
substring, strstr returns the pointer value NULL. If the length of *substr is zero,
strstr returns str.
Usage Guidelines
The strstr function does not include the null character terminating *substr as part of
the substring to search for.
#include <stringh>
char *strstr(const char *str, const char *substr);