Automation Anywhere interview question

How to remove duplicates from a String?