Skip to main content

try_apply_edits

Function try_apply_edits 

Source
pub fn try_apply_edits(old: &str, edits: &[Edit]) -> Option<String>
Expand description

apply_edits for an edit chain of unproven provenance: None when any edit does not fit the text its predecessors produced.

Folds in place, so peak memory is one text rather than one per edit.