Provide a split method which doesn't consume the element used to split #53890
Labels
C-feature-request
Category: A feature request, i.e: not implemented / a PR.
T-libs-api
Relevant to the library API team, which will review and decide on the PR/issue.
The split method consumes the element used to split, how you can see in the code below. But in some cases would be nice to move the element to the "first or second slice" like the split_at method does, but to n slices.
The numpy library has a method like that.
https://play.rust-lang.org/?gist=94dd413054604e4efffa96a5e8ed72b5&version=stable&mode=debug&edition=2015
Code
Output
New Split Method1 Output
New Split Method2 Output
The text was updated successfully, but these errors were encountered: