substring method
Returns the substring of this string that extends from startIndex
,
inclusive, to endIndex
, exclusive.
var string = 'dartlang';
string.substring(1); // 'artlang'
string.substring(1, 4); // 'art'
Implementation
String substring(int startIndex, [int endIndex]);