Skip to main content

replace_scc_section_in

Function replace_scc_section_in 

Source
pub fn replace_scc_section_in(
    existing: &str,
    new_section: &str,
    open: &str,
    close: &str,
) -> String
Expand description

Replace a managed section delimited by an explicit marker pair, keeping everything before the opening marker and everything after the closing marker. Pairing never spans a second opening marker. If no complete pair is present, the new section is appended and later user text (including an orphaned open) is preserved.