public class Test { public static void main(String[] args) { String str = "zifuchun1;zifuchuan2;zifuchuan3;zifuchuan4"; String[] ary = str.split(";");//调用API方法按照逗号分隔字符串 for(String item: ary){ System.out.println(item); } } }
字符分割
最新推荐文章于 2023-08-01 15:34:27 发布