pub fn check_page_number(page: usize, allow_zero: bool) -> usize {
    if allow_zero && page == 0 {
        return 0;
    }
    max(1, min(page, get_max_page_number()))
}
// Checks if a supplied page exists
Checks if a supplied page exists
Checks if a supplied page exists
pub fn check_page_number(page: usize, allow_zero: bool) -> usize {
    if allow_zero && page == 0 {
        return 0;
    }
    max(1, min(page, get_max_page_number()))
}
pub fn check_page_number ( page : usize , allow_zero : bool ) -> usize { if allow_zero && page == 0 { return 0 ; } max ( 1 , min ( page , get_max_page_number ( ) ) ) }
Checks if a supplied page exists
Checks if a supplied page exists
page
usize
allow_zero
bool