RosettaCodeData/Task/Reverse-a-string/Ruby/reverse-a-string-2.rb
2023-07-01 13:44:08 -04:00

3 lines
95 B
Ruby

graphemes = 'as⃝df̅'.scan(/\X/)
reversed = graphemes.reverse
graphemes.join #=> "f̅ds⃝a"