Answers for "flutter substring"

5

flutter substring

var string = 'dartlang';
string.substring(1);    // 'artlang'
string.substring(1, 4); // 'art'
Posted by: Guest on June-17-2020
2

flutter substring

void main() {
  const str = "the quick brown fox jumps over the lazy dog";
  const start = "quick";
  const end = "over";

  final startIndex = str.indexOf(start);
  final endIndex = str.indexOf(end, startIndex + start.length);

  print(str.substring(startIndex + start.length, endIndex)); // brown fox jumps
}
Posted by: Guest on June-14-2021
3

what is the use of substring in flutter

// To remove or add anything at the end or to the start of the string
Posted by: Guest on July-10-2020

Code answers related to "Dart"

Browse Popular Code Answers by Language