alfred-margaret-1.1.1.0: Fast Aho-Corasick string searching

Safe HaskellNone
LanguageHaskell2010

Data.Text.AhoCorasick.Splitter

Description

Splitting strings using Aho–Corasick.

Synopsis

Documentation

data Splitter Source #

Build a splitter once, then use it many times!

build :: Text -> Splitter Source #

Construct a splitter with a single separator.

automaton :: Splitter -> AcMachine () Source #

Get the automaton that would be used for finding separators.

separator :: Splitter -> Text Source #

What is the separator we are splitting on?

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.