Answers for "String .tr ruby"

2

.tr in ruby

# if wana transform a to n, b to m, c to o
messages.map { |c| c.tr("a-z", "n-za-m") }
Posted by: Guest on January-24-2021
0

ruby string trmi

>> @title = "abc"
=> "abc"
>> @title.strip!
=> nil
>> @title
=> "abc"
>> @title = " abc "
=> " abc "
>> @title.strip!
=> "abc"
>> @title
=> "abc"
Posted by: Guest on May-06-2020

Browse Popular Code Answers by Language