java的strim()方法的实现,ltrim(String str,String substr)和rtrim(String str,String substr)
packagehomework;publicclassTestTrim{publicstaticvoidmain(String[]args){Stringstr=TestTrim.trim("abcedab","ab");System.out.println(str);}publicstaticStringtrim(Stringstr,Stringsubstr){inti=0;intj=str.l