日期:2014-05-20 浏览次数:20841 次
public class Test { public static void main(String[]args) { String str1 = "helloabcd"; String str2 = "hello"; int startIndex = str1.indexOf(str2); String res = str1.substring(startIndex+str2.length()); System.out.println(res); } }