substring abstract method
The substring of this string fromstart, inclusive, toend, exclusive.
Example:
const string = 'dartlang';var result = string.substring(1); // 'artlang'result = string.substring(1, 4); // 'art'Bothstart andend must be non-negative and no greater thanlength;end, if provided, must be greater than or equal tostart.
Implementation
String substring(int start, [int? end]);