Module
Pipes.String
- Package
- purescript-node-stream-pipes
- Repository
- cakekindel/purescript-node-stream-pipes
#split Source
split :: forall m. MonadEffect m => Pattern -> Pipe (Maybe String) (Maybe String) m Unit
Accumulate string chunks until pat
is seen, then yield
the buffered
string up to (and not including) the pattern.
When end-of-stream is reached, yields the remaining buffered string then Nothing
.
toList $ yield "foo,bar,baz" >-> split ","
-- "foo" : "bar" : "baz" : Nil