也可以是其他符号,有这种问题的时候应该考虑先改存储的地方(可以按制定字符串拆分成数组,长度大于1的时候才加分隔符,否则末尾就不用添加了)
Boolean isNotEmpty = StringUtils.isNotBlank(this.version);
Boolean lastIndex = false;
if(isNotEmpty){
lastIndex = ",".equals(this.version.substring(version.length()-1));
}
if(isNotEmpty && lastIndex){
return this.version.substring(0,version.length()-1);
}else{
return this.version;
}
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。