funcSubString(strstring,begin,endint)string{ rs:=[]rune(str) length:=len(rs) ifbegin<0{ begin=0 } ifbegin>=length{ return"" } ifend>length{ returnstring(rs[begin:]) } returnstring(rs[begin:end]) }原文链接:https://www.f2er.com/go/190263.html
funcSubString(strstring,begin,endint)string{ rs:=[]rune(str) length:=len(rs) ifbegin<0{ begin=0 } ifbegin>=length{ return"" } ifend>length{ returnstring(rs[begin:]) } returnstring(rs[begin:end]) }原文链接:https://www.f2er.com/go/190263.html