Searching for a matching subslice?

时间:2016-10-09 15:50:30

标签: rust slice

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. :-)

0 个答案:

没有答案