instance method
swapcase
Ruby on Rails 4.0.13
Since v4.0.13 Last seen in v5.2.8.1Signature
swapcase()
Converts characters in the string to the opposite case.
'El Cañón".mb_chars.swapcase.to_s # => "eL cAÑÓN"
Source
# File activesupport/lib/active_support/multibyte/chars.rb, line 129
def swapcase
chars Unicode.swapcase(@wrapped_string)
end
Defined in activesupport/lib/active_support/multibyte/chars.rb line 129
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveSupport::Multibyte::Chars