W
Wolfgang Nádasi-Donner
Moin, moin!
The description for "tr" does not state what should happen, if the
second string ist an empty string. In the actual implementation all
character from the object string will be deleted, if they appear in the
first parameter string.
irb(main):001:0> 'Hello, world!'.tr('aeiou','')
=> "Hll, wrld!"
My question is: Is this an Error in the implementation or a special
case, which is not documented?
Wolfgang Nádasi-Donner
The description for "tr" does not state what should happen, if the
second string ist an empty string. In the actual implementation all
character from the object string will be deleted, if they appear in the
first parameter string.
irb(main):001:0> 'Hello, world!'.tr('aeiou','')
=> "Hll, wrld!"
My question is: Is this an Error in the implementation or a special
case, which is not documented?
Wolfgang Nádasi-Donner