replaceAll ("\\s+$",""); } $ 表示字串結束, 也就是以一個以上空格結束之意. 若要刪除開始與結束兩邊的空白, 其實Java 的String 類別已經提供了trim() ...
確定! 回上一頁