-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | break bytestrings up into substrings -- -- break bytestrings up into substrings, uses karprabin. support for -- pipes included @package bytestring-substring @version 0.1 module Data.ByteString.Substring breakSubstringLazy :: ByteString -> ByteString -> (ByteString, ByteString) prepareBreakSubstring :: ByteString -> ByteString -> KarpRabinState breakSubstringResume :: KarpRabinState -> ByteString -> KarpRabinResult data KarpRabinState data KarpRabinResult -- | The first number is the index into the current chunk. The second -- number is the total number of characters that were consumed. Note that -- since these both refer to the index of the beginning of the match, the -- first one is allowed to be negative, but the second is not. The third -- item is the bytes preceeding the match location. This is provided to -- help streaming providers that may have already discarded the old data. KarpRabinResultDone :: !Int -> !Int64 -> KarpRabinResult KarpRabinResultMore :: !KarpRabinState -> KarpRabinResult module Pipes.ByteString.Substring consumeBreakSubstring :: Monad m => ByteString -> Consumer' ByteString m (Builder, ByteString) consumeBreakSubstringLeftovers :: Monad m => ByteString -> ByteString -> Consumer' ByteString m (Builder, ByteString) -- | 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. consumeDropExactLeftovers :: Monad m => ByteString -> ByteString -> Consumer' ByteString m (Either (Int, ByteString) ByteString) consumeDropWhileLeftovers :: Monad m => ByteString -> (Char -> Bool) -> Consumer' ByteString m ByteString