instance method swapcase

Ruby on Rails 4.1.16

Since v4.0.13 Last seen in v5.2.8.1

Available in: v4.0.13 v4.1.16 v4.2.9 v5.2.8.1

Signature

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 128
      def swapcase
        chars Unicode.swapcase(@wrapped_string)
      end

Defined in activesupport/lib/active_support/multibyte/chars.rb line 128 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActiveSupport::Multibyte::Chars

Type at least 2 characters to search.

↑↓ navigate · open · esc close