STRSTR STRSTR String Search Function Usage Searches for the first occurance of one string inside another. The general syntax for its use is p = strstr(x,y) where x and y are two strings. The returned integer p indicates the index into the string x where the substring y occurs. If no instance of y is found, then p is set to zero.