java的string方法使用

1、将list转换为“,”隔开的字符串

//videoIdList值转换成 1,2,3
 String videoIds = StringUtils.join(videoIdList.toArray(), ",");

2、取字符串的开始到最后 "." ;如(01.03.09.mp4 取后就为:01.03.09

 String title = fileName.substring(0, fileName.lastIndexOf("."));
原文地址:https://www.cnblogs.com/dupenghui/p/13667055.html