instance method
reverse
Ruby on Rails 2.3.18
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 322
def reverse
chars(self.class.g_unpack(@wrapped_string).reverse.flatten.pack('U*'))
end
Defined in activesupport/lib/active_support/multibyte/chars.rb line 322
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveSupport::Multibyte::Chars