BMC Software interview question

Given a string, remove all the duplicate characters (not necessarily consecutive)