remove trailing whitespace ruby code example Example: ruby remove whitespace beginning and end ' str '.strip # => 'str'