Remove duplicate characters in string