Function strstr

Top 

 

 

Declaration:

int strstr(char s1[], char s2[], int s1_index=0, int s2_index=0);

Description

The strstr function searches for the first occurrence of the string from s2 in line s1 (the zero character is not taken into account).

Returned value

The strstr function returns the number of the first byte of the string from s2, or returns -1, if there is no such string there.