会员
周边
众包
新闻
博问
闪存
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
Michelle's Home
博客园
首页
新随笔
联系
管理
订阅
2014年5月12日
Java中去除字符串中的空格
摘要: 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)
编辑
公告