rev_slice 0.2.0

A newtype for operating on a reversed view of a slice.
Documentation
1
2
3
4
5
6
7
8
9
# rev_slice


A simple alternative to negative indexing on rust slices

Ever wanted `a[-1]` in Rust?  With this crate, you can do that as `a.rev()[0]`.

Also provided are the other slice methods on the reversed slice, and you can
`.rev()` again to get the original slice back.  So you can, for example,
remove the last element of a slice with `a.rev()[1..].rev()`.