java - Is there a substring(start, length) function? -


i trying use similar method c#'s string.substring(int start, int length).

but substring function in java string.substring(int start, int end).

i want able pass start position , length substring function.

can me solve issue?

it

string mysubstring(string mystring, int start, int length) {     return mystring.substring(start, math.min(start + length, mystring.length())); } 

     


Comments

Popular posts from this blog

iphone - Three second countdown in cocos2d -

hyperlink - how to do url routing in php -

c++ - CryptStringToBinary API behavior -