This package aims to be a vector-based replacement for the list-based split
package.
Every function in vector-split
is quickchecked against its split
counterpart. Additionally the code examples in the documentation are checked with doctest
. In theory this means that the library are functionally equally. Some caveats remain.
This package should be close to 100% API compatible with split
if you discount the fact that it is working on vectors. Two caveats remain, in order of (my perceived) severity:
vector-split
must not be used with empty delimiters. Insplit
this is handled as a special case and there is documentation in place not to do it either, so there is no special support invector-split
.condense
does not work exactly like thesplit
counterpart. This is mostly due to howsplit
is basically a monolithic function which can not exactly be reproduced by combining smaller functions. If this ever becomes a problem in a real use case please file an issue on github.- In
vector-split
strategies are just functionsVector v a => v a -> [v a]
compared tosplits
ADTSplitter
type. This means that strategy transformers are chained by function composition instead of application:vector-split
:dropDelims . oneOf "xyz"
vssplit
:dropDelims (oneOf "xyz")
.