delete method
Deletes length of characters from this document starting at index
.
This method applies heuristic rules before modifying this document and
produces a Change
with source set to ChangeSource.local.
Returns an instance of Delta actually composed into this document.
Implementation
Delta delete(int index, int len) {
assert(index >= 0 && len > 0);
final delta = _rules.apply(RuleType.delete, this, index, len: len);
if (delta.isNotEmpty) {
compose(delta, ChangeSource.local);
}
return delta;
}