End of Life Ruby 3.1 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
String#tr_s!
str.tr_s!(from_str, to_str) → str or nil
string.c
View on GitHub ↗
static VALUE
rb_str_tr_s_bang(VALUE str, VALUE src, VALUE repl)
{
return tr_trans(str, src, repl, 1);
}
Performs String#tr_s processing on str in place, returning str, or nil if no changes were made.