Cpp String Find Substring Leetcode Problem 940