Remove Duplicate Characters

Remove duplicate characters from a string while keeping only the first occurrence of each character.

Code

General
s.chars.uniq.join

Parameters

The string to remove duplicates from

Server

More Ruby Snippets