String result = str.trim();. The trim() method will remove both leading and trailing whitespace from a string and return the result.
確定! 回上一頁