摘要: 1.去掉首尾的空格String.trim()trim()是去掉首尾空格2.去掉所有的空格str.replace(" ", ""); 去掉所有空格,包括首尾、中间eg:String str = " hell o ";String str2 = str.replaceAll(" ", "");Syste... 阅读全文
posted @ 2014-05-12 15:43 Michelle's Home 阅读(823) 评论(0) 推荐(0) 编辑