Given a string, you have to return a string in which each character (case-sensitive) is repeated once.
* "String" -> "SSttrriinngg"
* "Hello World" -> "HHeelllloo WWoorrlldd"
* "1234!_ " -> "11223344!!__ "
Good Luck!
def double_char(str)
str.chars.map { |ch| ch*2 }.join
end
def double_char(str)
str.gsub /(.)/, '\1\1'
end