mutant
mutant copied to clipboard
Mutate `str.tr_s(pattern, '')` → `str.delete(pattern)`
These are equivalent:
'222-333-4444'.tr_s('^0-9', '') # => "2223334444"
'222-333-4444'.delete('^0-9') # => "2223334444"
Could probably also do that for String#tr. Honestly, I don't know the difference between tr and tr_s even after rereading the Ruby docs