Skip to content
instance method

String#tr_s!

(::String::selector source, ::string replacement) -> self?
tr_s!(selector, replacements) → self or nil

Like String#tr_s, except:

  • Modifies self in place (not a copy of self).

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

Related: Modifying.

See also #tr_s #undump #tr! #unicode_normalize also in 4.1 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0