Java 字符串包含
函数boolean containsAny(String str, String searchChars) 判断str字符串中是否包含searchChars字符串
String khh_str = ""; if(list.size()>0){ khh_str = "('"; for (int i = 0; i < list.size(); i++) { String now_khh = list.get(i).getKhh().trim(); if(!khh_str.contains(now_khh)){ if(i>0){ khh_str += "','"; } khh_str += now_khh; } } khh_str += "')"; }