String[] modelCodeAttr = ((String)map.get("modelCode")).split(",");
Set set = new HashSet();
for(String modelCode : modelCodeAttr) {
set.add(modelCode);
}
map.put("modelCode", StringUtils.join(set.toArray(), ","));
JAVA 去除一段按逗号分割的字符串中重复的元素
最新推荐文章于 2023-05-17 14:39:00 发布