摘要:
JAVA中去掉空格1.String.trim() trim()是去掉首尾空格2.str.replace("","");去掉所有空格,包括首尾、中间Stringstr="hello"; Stringstr2=str.replaceAll("",""); System.out.println(str2);3.或者replaceAll("+","");去掉所有空格4.str=.replaceAll("\\s*","");可 阅读全文
posted @ 2013-04-18 16:56
hold su
阅读(241)
评论(0)
推荐(0)

浙公网安备 33010602011771号