Hutool
官网:https://www.hutool.cn/
1、去掉字符串后面的0
方法:ReUtil.replaceAll
System.out.println(cn.hutool.core.util.ReUtil.replaceAll("1010000","0+$", "")); //输出:101
2、列表转逗号分隔字符串
方法:CollUtil.join
List<Long> colList =new ArrayList<>();
colList.add((long) 1);
colList.add((long) 2);
colList.add((long) 3);
colList.add((long) 4);
String str = CollUtil.join(colList, ",");
System.out.println(str);//输出:1,2,3,4
未完待续…….
{{o.name}}
{{m.name}}