Метод replaceRange (абстрактный)
String replaceRange(Заменяет подстроку с start по end на replacement.
Возвращает новую строку, эквивалентную:
this.substring(0, start) + replacement + this.substring(end)
Индексы start и end должны определять допустимый диапазон этой строки. То есть 0 <= start <= end <= this.length. Если end равно null, оно по умолчанию равно длине.
Исходный код
String replaceRange(int start, int end, String replacement);
© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dartlang.org/stable/1.24.3/dart-core/String/replaceRange.html