Skip to main content

split_into_sections

Function split_into_sections 

Source
pub fn split_into_sections(content: &str) -> Vec<(String, String)>
Expand description

Split .s2s file content into sections by //~ markers.

In Stranded II, files can be partitioned using //~SectionName at the start of a line. The loadfile command then loads only the named section. Returns (section_name, content) pairs. The content before the first //~ marker is returned with an empty-string name.