Remove trailing whitespace function.