strstr
From cppreference.com
Defined in header <string.h>
|
||
char *strstr( const char* str, const char* substr ); |
||
Finds the first occurrence of the null-terminated byte string pointed to by substr
in the null-terminated byte string pointed to by str
. The terminating null characters are not compared.
The behavior is undefined if either str
or substr
is not a pointer to a null-terminated byte string.
Parameters
str | - | pointer to the null-terminated byte string to examine |
substr | - | pointer to the null-terminated byte string to search for |
Return value
Pointer to the first character of the found substring in str
, or NULL if no such substring is found. If substr
points to an empty string, str
is returned.