monad-ox-0.3.0: Monad for observation extraction

Safe HaskellNone

Control.Monad.Ox.Text.Lazy

Description

Popular transformation functions for the Text observation type.

Synopsis

Documentation

prefix :: Int -> Text -> Maybe TextSource

Prefix of the given size or Nothing if the size exceeds the length of the text.

suffix :: Int -> Text -> Maybe TextSource

Suffix of the given size or Nothing if the size exceeds the length of the text.

substr :: Int -> Text -> [Text]Source

All substrings of the given size.

shape :: Text -> TextSource

Shape of the text. All lower-case characters are mapped to l, upper-case characters to u, digits to d and rest of characters to x.

pack :: Text -> TextSource

Pack the text, that is remove all adjacent repetitions, for example aabcccdde -> abcde.