您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

去掉String属性的最后一个逗号

2025/11/26 15:00:24发布29次查看
也可以是其他符号,有这种问题的时候应该考虑先改存储的地方(可以按制定字符串拆分成数组,长度大于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; }
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product