| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Data.Text.AhoCorasick.Splitter
Description
Splitting strings using Aho–Corasick.
Synopsis
- data Splitter
- build :: Text -> Splitter
- automaton :: Splitter -> AcMachine ()
- separator :: Splitter -> Text
- split :: Splitter -> Text -> NonEmpty Text
- splitIgnoreCase :: Splitter -> Text -> NonEmpty Text
- splitReverse :: Splitter -> Text -> NonEmpty Text
- splitReverseIgnoreCase :: Splitter -> Text -> NonEmpty Text
Documentation
Build a splitter once, then use it many times!
Instances
| Eq Splitter Source # | |
| Ord Splitter Source # | |
Defined in Data.Text.AhoCorasick.Splitter | |
| Show Splitter Source # | |
| Hashable Splitter Source # | |
Defined in Data.Text.AhoCorasick.Splitter | |
| ToJSON Splitter Source # | |
Defined in Data.Text.AhoCorasick.Splitter | |
| FromJSON Splitter Source # | |
| NFData Splitter Source # | |
Defined in Data.Text.AhoCorasick.Splitter | |
automaton :: Splitter -> AcMachine () Source #
Get the automaton that would be used for finding separators.
split :: Splitter -> Text -> NonEmpty Text Source #
Split the given string into strings separated by the separator.
If the order of the results is not important, use the faster function
splitReverse instead.
splitIgnoreCase :: Splitter -> Text -> NonEmpty Text Source #
Split the given string into strings separated by the separator.
If the order of the results is not important, use the faster function
splitReverseIgnoreCase instead.
The separator is matched case-insensitively, but the splitter must have been constructed with a lowercase needle.
splitReverse :: Splitter -> Text -> NonEmpty Text Source #
Like split, but return the substrings in reverse order.
splitReverseIgnoreCase :: Splitter -> Text -> NonEmpty Text Source #
Like splitIgnoreCase, but return the substrings in reverse order.