Skip to main content

splice

Function splice 

Source
pub fn splice(text: &str, regions: &[Range<usize>], mended: &[String]) -> String
Expand description

text with each region’s lines replaced by the mended lines it got back, last region first so earlier line numbers stay true; the rest of the text is untouched, byte for byte.