Skip to main content

parse_pages

Function parse_pages 

Source
pub fn parse_pages(
    spec: &str,
    total: usize,
    max: usize,
) -> Result<Vec<usize>, String>
Expand description

Parse a page list like "3", "1-3,5", "4-" or "all" against total pages. Pages count from 1; the result is sorted, without duplicates, at most max long.