Skip to main content

runs

Function runs 

Source
fn runs(
    chars: &[char],
    start: usize,
    allowed: impl Fn(char) -> bool,
    hyphens: bool,
    most: usize,
) -> Vec<(usize, String)>
Expand description

Runs of allowed characters from start, a single space (or hyphen, when hyphens) allowed between them: each place a run could end, with the characters kept so far. A place is kept only where no letter or digit follows.