Mega Code Archive

 
Categories / Ruby / String
 

Removing duplicates

"hello".squeeze('a-z')  # => "helo": remove runs of letters. Also squeeze!