Method: ActiveSupport::Multibyte::Chars#reverse

Defined in:
activesupport/lib/active_support/multibyte/chars.rb

#reverseObject

Reverses all characters in the string.

'Café'.mb_chars.reverse.to_s # => 'éfaC'


106
107
108
# File 'activesupport/lib/active_support/multibyte/chars.rb', line 106

def reverse
  chars(@wrapped_string.grapheme_clusters.reverse.join)
end