method
rstrip
rstrip()
public
Returns a copy of the receiver with trailing whitespace removed. See also String#lstrip and String#strip.
Refer to String#strip for the definition of whitespace.
" hello ".rstrip #=> " hello" "hello".rstrip #=> "hello"