Hi fellow Gophers

I wonder why is the `Index` function from the "slices" package much less 
powerful than the one in the "bytes" package?

`bytes.Index` allows us to search for {1, 2, 3} within {1, 1, 2, 3}, 
whereas `slices.Index` only does the trivial thing of whether a single 2 is 
inside {1, 1, 2, 3}.

What is the best way of doing `bytes.Index` but on say integer slices 
`[]int`?
Is it reasonable to propose adding a function `slices.IndexAll` to the 
"slices" package?

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/golang-nuts/8be23211-6173-4def-a1fe-74b4510491f7n%40googlegroups.com.

Reply via email to