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
Synopsis
- class Split out where
- (/) :: ByteString -> ByteString -> out
- class SplitFront out where
- (-/) :: ByteString -> ByteString -> out
- class SplitEnd out where
- (/-) :: ByteString -> ByteString -> out
- 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 #
Instances
Split [ByteString] Source # |
["a", "bc", "de"] |
Defined in Text.Regex.Do.Split (/) :: ByteString -> ByteString -> [ByteString] Source # | |
Split (ByteString, ByteString) Source # |
("a", "bc\nde") |
Defined in Text.Regex.Do.Split (/) :: ByteString -> ByteString -> (ByteString, ByteString) Source # |
class SplitFront out where Source #
keep needle @ front
(-/) :: ByteString -> ByteString -> out Source #
Instances
SplitFront [ByteString] Source # |
["a", "\nbc", "\nde"] |
Defined in Text.Regex.Do.Split (-/) :: ByteString -> ByteString -> [ByteString] Source # | |
SplitFront (ByteString, ByteString) Source # |
("a", "\nbc\nde") |
Defined in Text.Regex.Do.Split (-/) :: ByteString -> ByteString -> (ByteString, ByteString) Source # |
class SplitEnd out where Source #
keep needle @ end
(/-) :: ByteString -> ByteString -> out Source #
Instances
SplitEnd [ByteString] Source # |
["a\n", "bc\n", "de"] |
Defined in Text.Regex.Do.Split (/-) :: ByteString -> ByteString -> [ByteString] Source # | |
SplitEnd (ByteString, ByteString) Source # |
("a\n", "bc\nde") |
Defined in Text.Regex.Do.Split (/-) :: ByteString -> ByteString -> (ByteString, ByteString) Source # |
type T = (ByteString, ByteString) Source #
Break result: tuple
type L = [ByteString] Source #
Split result: list