Microsoft interview question

How to eliminate duplicates in a string.