Safe Haskell | None |
---|---|
Language | Haskell2010 |
see Data.ByteString.Search package
break, split ops on ByteString
regex is treated as ordinary String
break & split are now /
, -/
, /-
replace moved to Text.Regex.Do.Replace.Fast
- class Split out where
- class SplitFront out where
- class SplitEnd out where
- type T = (ByteString, ByteString)
- type L = [ByteString]
Documentation
class Split out where Source #
slices ByteString
. drops needle
to avoid clash with Prelude
:
import Prelude hiding((/))
or qualify /
with alias e.g. (assuming this module is imported with S alias):
S./
body -> pattern -> result
(/) :: ByteString -> ByteString -> out Source #
Split [ByteString] Source # |
["a", "bc", "de"] |
Split (ByteString, ByteString) Source # |
("a", "bc\nde") |
class SplitFront out where Source #
keep needle @ front
(-/) :: ByteString -> ByteString -> out Source #
SplitFront [ByteString] Source # |
["a", "\nbc", "\nde"] |
SplitFront (ByteString, ByteString) Source # |
("a", "\nbc\nde") |
class SplitEnd out where Source #
keep needle @ end
(/-) :: ByteString -> ByteString -> out Source #
SplitEnd [ByteString] Source # |
["a\n", "bc\n", "de"] |
SplitEnd (ByteString, ByteString) Source # |
("a\n", "bc\nde") |
type T = (ByteString, ByteString) Source #
Break result: tuple
type L = [ByteString] Source #
Split result: list