ruby strip whitespace and newline code example
Example 1: ruby trim spaces
" Hello ".strip
Example 2: ruby remove whitespace beginning and end
' str '.strip # => 'str'
" Hello ".strip
' str '.strip # => 'str'