Safe Haskell | None |
---|---|
Language | Haskell2010 |
- tryTokInternal :: String -> ByteString -> ByteString -> ByteString -> Maybe [ByteString]
- forceTokReplace :: String -> ByteString -> ByteString -> ByteString -> ByteString
- breakOutToken :: String -> ByteString -> (ByteString, ByteString, ByteString)
- breakToTokens :: ByteString -> [ByteString]
- defaultToks :: String
Documentation
tryTokInternal :: String -> ByteString -> ByteString -> ByteString -> Maybe [ByteString] Source #
tryTokInternal takes a String of token chars, an oldToken ByteString, a newToken ByteString and returns the list of token-delimited ByteStrings, with any tokens matching oldToken being replaced by newToken. If newToken is already in the input, we return Nothing.
forceTokReplace :: String -> ByteString -> ByteString -> ByteString -> ByteString Source #
forceTokReplace replaces all occurrences of the old token with the new token, throughout the input ByteString.
breakOutToken :: String -> ByteString -> (ByteString, ByteString, ByteString) Source #
breakOutToken takes a String of token chars and an input ByteString, and returns the ByteString triple of (beforeToken, token, afterToken).
breakToTokens :: ByteString -> [ByteString] Source #
defaultToks :: String Source #