📜  dart 子字符串 - Dart 代码示例

📅  最后修改于: 2022-03-11 14:48:09.178000             🧑  作者: Mango

代码示例5
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
}