Strip the tab and new line characters : Strip « String « Ruby






Strip the tab and new line characters



"\t\tBye, tabs and line endings!\r\n".strip # => "Bye, tabs and line endings!"

 








Related examples in the same category

1.strip both sides
2.Strip from both side in place
3.strip removes other kinds of whitespace, too:
4.Managing Whitespace and new line character