In C++ there is a function contains_subrange
to check if a given sequence/range contains a sub range. Is there a Rust equivalent of the same for different collections?
I think there is no built-in thing. (Even the unstable subslice_range
does something else.)
However, the above suggests to use windows()
.position()
.