trim string the leading and trailing whitespaces