instance method
reverse
Ruby on Rails 6.0.6
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 115
def reverse
chars(@wrapped_string.scan(/\X/).reverse.join)
end
Defined in activesupport/lib/active_support/multibyte/chars.rb line 115
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveSupport::Multibyte::Chars