public static void main(String[] args) { String str = "ABC_001"; if (str.indexOf("ABC") != -1) { System.out.println("包含"); } else { System.out.println("不包含"); } }
原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/16027.html
public static void main(String[] args) { String str = "ABC_001"; if (str.indexOf("ABC") != -1) { System.out.println("包含"); } else { System.out.println("不包含"); } }
原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/16027.html