Function wrapped
pub fn wrapped<T>(signed_range: impl RangeBounds<T>) -> impl SignedRange
Expand description
Accepts negative bounds, interpreted relative to the end of the collection.
ยงExamples
wrapped(1..-2); // from 1 to len-2
wrapped(..-2); // from 0 to len-2
wrapped(-3..); // from len-3 to end
wrapped(-4..3); // from len-4 to 3