std::String::find
searches for a pattern in a String
, and in particular can search for a substring.
I can't see an equivalent for general slices, or even (as I'm interested in) specifically &[u8]
or Vec<u8>
. Have I missed something obvious? It seems it would be an even easier thing to provide for &[u8]
than for String
when you don't need to worry about UTF-8. :-)