Ruby String Trmi

[Solved] Ruby String Trmi | Ruby - Code Explorer | yomemimo.com
Question : ruby string trmi

Answered by : justin-swart

>> @title = "abc"
=> "abc"
>> @title.strip!
=> nil
>> @title
=> "abc"
>> @title = " abc "
=> " abc "
>> @title.strip!
=> "abc"
>> @title
=> "abc"

Source : https://stackoverflow.com/questions/1000688/what-is-the-canonical-way-to-trim-a-string-in-ruby-without-creating-a-new-string | Last Update : Wed, 13 May 20

Answers related to ruby string trmi

Code Explorer Popular Question For Ruby