标签:sp java bs as new nbsp text 字符串 class
截取逗号后字符
String str = new String ("1,2,3,4,5,6");
String[] str1 = str.split(",");
System.out.println(str1[2]);//选择第3个元素
替换指定字符
String s = “abcat”;
String s1 = s.replace(‘a’,‘1’);标签:sp java bs as new nbsp text 字符串 class
原文地址:http://my.oschina.net/u/587105/blog/346910