标签:ar sp java for on bs amp as nbsp
public static void main(String[] args) {
if(isHave("购买ab","出售AssBC"))
System.out.println("true"); //返回true
else
System.out.println("false");
}
// public static String reg = "[`~!#$%^&*()+=|{}‘:;‘,\\[\\].<>/?~!#¥%……&*()——+|{}【】‘;:”“’。,、?]";
public static boolean isHave(String strs,String s){
for (int i = 0; i < strs.length()-1; i++) {
for (int j = i+1; j < strs.length(); j++) {
if(s.toLowerCase().contains(strs.toLowerCase().substring(i, j))){
return true;
}
}
}
return false;
}
标签:ar sp java for on bs amp as nbsp
原文地址:http://www.cnblogs.com/MyBeN/p/4098979.html