W3cubDocs

/Dart 2

substring method

String substring (int startIndex, [ int endIndex ])

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]);

© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dart.dev/stable/2.5.0/dart-core/String/substring.html