str.strip â new_str
Instance Public methods
Returns a copy of str with leading and trailing whitespace removed.
1 2 | " hello " .strip #=> "hello" "\tgoodbye\r\n" .strip #=> "goodbye" |
Returns a copy of str with leading and trailing whitespace removed.
1 2 | " hello " .strip #=> "hello" "\tgoodbye\r\n" .strip #=> "goodbye" |
Designed by : w10schools
service@w10schools.com
Please login to continue.