摘要: String str = " Hello Genius! "; //方法1:String.trim();trim()是去掉首尾空格 System.out.println("1:"+str.trim()); //方法2:str.replaceAll(" ", ""); 去掉所有空格,包括首尾、中间 S 阅读全文
posted @ 2019-06-28 11:52 junxin_zxf 阅读(3553) 评论(0) 推荐(0)