-
Notifications
You must be signed in to change notification settings - Fork 196
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
split function for Data.Conduit.Text #205
Comments
Just for info / reference, I did something similar when implementing fusion in conduit-combinators: https://github.com/fpco/conduit-combinators/blob/master/Data/Conduit/Combinators.hs#L1889 The main difference is that yours takes a |
Cool @mgsloan. I guess the conduit-combinators version of this would take an |
Yup, that seems reasonable to me. I'm not seeing an implementation of |
I think the code above is subtly broken; if the broken-upon string occurs over a chunk boundary, it won't fire. E.g.: mapM_ yield ["123x", "x456"] $= split "xx" doesn't look like it would result in the output you'd expect. |
Tracked by PR #207 |
Hi, I needed a split function for some log parsing I was doing with Conduit, would you be interested in me adding this to
Data.Conduit.Text
? If so, I can add tests and remove the Safe dependency that my code is using, then submit a PR.This is the code I'm currently using; it's modeled closely after
lines
and I believelines
could be implemented in terms ofsplit
.The text was updated successfully, but these errors were encountered: