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