Maintenance Ruby 3.3 gets fixes, but no new features. Switch to Ruby 4.0 →
instance method
String#tr!
tr!(selector, replacements) → self or nil
string.c
View on GitHub ↗
static VALUE
rb_str_tr_bang(VALUE str, VALUE src, VALUE repl)
{
return tr_trans(str, src, repl, 0);
}
Like String#tr, but modifies self in place. Returns self if any changes were made, nil otherwise.