123456 怎么拆分成 1,2,3,4,5
lua吧
全部回复
仅看楼主
level 1
13737837220le 楼主
来个大神教教怎么拆分
2021年12月04日 14点12分 1
level 1
public static void main(String[] args) {
String template = "123456";
List<Character> result = new ArrayList<>();
for (int i = 0; i < template.length(); i++) {
result.add(template.charAt(i));
}
// 1, 2, 3, 4, 5, 6
String resultStr = result.toString().replaceAll("(\\[|\\])","");
System.out.println(resultStr);
}
2021年12月09日 07点12分 2
这怎么越看越像java
2021年12月30日 09点12分
level 10
用string.gsub()试一下
2021年12月31日 16点12分 3
1