Skip to content
instance method

String#swapcase!

() -> self?
(:ascii | :lithuanian | :turkic) -> self?
(:lithuanian, :turkic) -> self?
(:turkic, :lithuanian) -> self?
swapcase!(mapping) → self or nil

Like String#swapcase, except that:

  • Changes are made to self, not to copy of self.

  • Returns self if any changes are made, nil otherwise.

Related: see Modifying.

See also #swapcase #to_c #sum #to_f also in 4.1 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0