java基础
String strl = "12ssweeks324failed";
int endindex1 = strl.indexOf("weeks");
System.out.println(strl.substring(0, endindex1));
if (endindex1 != -1) {
System.out.println("==1");
} else {
System.out.println("==2");
}
int startindex = endindex1 + 5;
endindex1 = strl.indexOf("failed");
System.out.println(strl.substring(startindex, endindex1));