trimRight method

Returns the string without any trailing whitespace.

String trimRight( )

Returns the string without any trailing whitespace.

As trim, but only removes trailing whitespace.