Skip to content
fn

next_index

int next_index(int i)

The index after i, or i itself at the top of the range: a saturated position stays out of range instead of wrapping back into it.