fixed build fail and removeRepeatedChars impl + testcase