Skip to main content

split_block

Function split_block 

Source
pub fn split_block(text: &str) -> Result<(String, Option<String>), MarkerError>
Expand description

Split a host text into its lines outside the managed region and the region itself, validating the markers first.

ยงErrors

MarkerError::Malformed when the marker counts disagree or a second region appears; MarkerError::OutOfOrder when END precedes BEGIN.