java判断某一字符串是否包含另一个字符串

来源:互联网 发布:项目进度跟踪软件 编辑:程序博客网 时间:2024/06/08 17:46
  String str="ABC_001";
if(str.indexOf("ABC")!=-1){
System.out.println("包含");
}else{
System.out.println("不包含");
}
阅读全文
0 0