update the solution of strstr