java函数substring()

String str;

str=str.substring(int beginIndex);截取掉str从首字母起长度为beginIndex的字符串,将剩余字符串赋值给str;

str=str.substring(int beginIndex,int endIndex);截取str中从beginIndex开始至endIndex结束时的字符串,并将其赋值给str;

posted @ 2016-02-21 20:39  Hello_2018  阅读(425)  评论(0编辑  收藏  举报