A better version of trim whitespace