instance method
reverse
Ruby on Rails 7.2.3
Since v2.2.3Signature
reverse()
Reverses all characters in the string.
'Café'.mb_chars.reverse.to_s # => 'éfaC'
Source
# File activesupport/lib/active_support/multibyte/chars.rb, line 109
def reverse
chars(@wrapped_string.grapheme_clusters.reverse.join)
end
Defined in activesupport/lib/active_support/multibyte/chars.rb line 109
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveSupport::Multibyte::Chars