substring

string.substring(beginindex)  

beginIndex - 开始处的索引(包括)

"unhappy".substring(2)returns"happy"

string.substring(beginindex,endindex ) 

示例:
"hamburger".substring(3,8) returns "burge"
"smiles".substring(0,5) returns "smile"
参数:
beginIndex - 开始处的索引(包括)。
endindex 结尾处索引(不包括)。
posted @ 2016-01-14 16:08  张主任好  阅读(142)  评论(0)    收藏  举报