Trim whitespace from strings