pub fn splice(source: &str, edits: &[AppliedEdit]) -> StringExpand description
Apply edits to source by byte-splice. Edits are spliced in reverse
start order so earlier offsets stay valid; whitespace outside each span
is preserved verbatim.
Edits MUST be non-overlapping — the engine resolves overlaps up front (see
engine::dedupe_overlapping) by keeping the outermost match. This function
is a defensive backstop: an out-of-range, mis-aligned, or overlapping span
is skipped rather than allowed to panic replace_range, so a buggy rule can
never corrupt a file by splicing a stale offset.