tr_s(p1, p2)
public
Processes a copy of str as described under String#tr, then removes
duplicate characters in regions that were affected by the translation.
"hello".tr_s('l', 'r')
"hello".tr_s('el', '*')
"hello".tr_s('el', 'hx')
Show source
static VALUE
rb_str_tr_s(VALUE str, VALUE src, VALUE repl)
{
str = rb_str_dup(str);
tr_trans(str, src, repl, 1);
return str;
}