Skip to main content

py_slice

Function py_slice 

Source
fn py_slice(data: &[u8], a: i64, b: i64) -> &[u8] ⓘ
Expand description

Python byte slicing data[a:b]: negative indexes count from the end, both ends clamp, and an inverted range is empty.