Automation Anywhere Interview Question

How to remove duplicates from a String?