Skip to main content

splice

Function splice 

Source
pub fn splice(existing: &str, block: &str) -> String
Expand description

Return existing with block spliced in.

When the markers are already present, the content between them (inclusive) is replaced. Otherwise, when a legacy # PGTUNE header is present, everything from that header to the end of the file is replaced. Otherwise the block is appended after a blank line.