applyEdit function
Get the result of applying the edit to the given code
. Access via
SourceEdit.apply().
Implementation
String applyEdit(String code, SourceEdit edit) {
if (edit.length < 0) {
throw RangeError('length is negative');
}
return code.replaceRange(edit.offset, edit.end, edit.replacement);
}