remove duplicate characters from a string