Java Position Of Substring In Cpp