function to perform the function of strstr