bytestring-substring-0.1: break bytestrings up into substrings

Safe HaskellNone
LanguageHaskell2010

Pipes.ByteString.Substring

Synopsis

Documentation

consumeDropExactLeftovers :: Monad m => ByteString -> ByteString -> Consumer' ByteString m (Either (Int, ByteString) ByteString) Source #

If we get back a Left, then the chunks did not match what we expected. The tuple contains the number of characters that did match and the beginning of the failure to match. If we get back a Right, it has the leftovers from the chunk that completed the match.