标签:
1.
java 去掉字符串的空格(中间空格,左右空格)
比如 时间字符串,去掉‘-’,‘:’,与空格
String x = "2008-09-08 11:12:23";
x=x.replace(‘-‘, ‘ ‘).replace(‘:‘, ‘ ‘).replaceAll(" ","");
输出:20080908111223
2.
String str = " asd ";
String ntr = ("A" + str).trim().substring(1);
3.
标签:
原文地址:http://www.cnblogs.com/zhangzhifeng/p/4236817.html