当前位置: 技术问答>java相关
如何把一个字符串中所有指定的字符删除?
来源: 互联网 发布时间:2015-11-04
本文导语: thanks | 看错了,不好意思: 可以这样 StringTokenizer st = new StringTokenizer("abcabc","a"); String result = ""; while (st.hasMoreTokens()) { result += st.nextToken(); } | StrinbBuffer ...
thanks
|
看错了,不好意思:
可以这样
StringTokenizer st = new StringTokenizer("abcabc","a");
String result = "";
while (st.hasMoreTokens()) {
result += st.nextToken();
}
可以这样
StringTokenizer st = new StringTokenizer("abcabc","a");
String result = "";
while (st.hasMoreTokens()) {
result += st.nextToken();
}
|
StrinbBuffer