@Test publicvoidtestBructForce(){ BructForce instance = new BructForce(); String src = "my first test class ever"; String pat = "class";
int location = instance.search(src, pat); System.out.println("查找的位置索引为: " + location);
String sub = src.substring(location); System.out.println("截取后的字符串为: " + sub); } @Test publicvoidtestBructForceNot(){ BructForce instance = new BructForce(); String src = "my first test class ever"; String pat = "clazz";