📜  颤振子字符串 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:46.383000             🧑  作者: Mango

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