rio-0.1.22.0: A standard library for Haskell

Safe Haskell | Safe-Inferred
Language | Haskell2010

RIO.Text.Partial

Contents

- Basic interface
- Transformations
- Folds
  - Special folds
- Substrings
  - Breaking strings
  - Breaking into many substrings
- Searching
- Indexing

Description

Strict `Text` partial functions. Import as:

    import qualified RIO.Text.Partial as T'

Synopsis

- head :: HasCallStack => Text -> Char
- last :: HasCallStack => Text -> Char
- tail :: HasCallStack => Text -> Text
- init :: HasCallStack => Text -> Text
- replace :: HasCallStack => Text -> Text -> Text -> Text
- foldl1 :: HasCallStack => (Char -> Char -> Char) -> Text -> Char
- foldl1' :: HasCallStack => (Char -> Char -> Char) -> Text -> Char
- foldr1 :: HasCallStack => (Char -> Char -> Char) -> Text -> Char
- maximum :: HasCallStack => Text -> Char
- minimum :: HasCallStack => Text -> Char
- breakOn :: HasCallStack => Text -> Text -> (Text, Text)
- breakOnEnd :: HasCallStack => Text -> Text -> (Text, Text)
- splitOn :: HasCallStack => Text -> Text -> [Text]
- breakOnAll :: HasCallStack => Text -> Text -> [(Text, Text)]
- count :: HasCallStack => Text -> Text -> Int

# Basic interface

head :: HasCallStack => Text -> Char #

last :: HasCallStack => Text -> Char #

tail :: HasCallStack => Text -> Text #

init :: HasCallStack => Text -> Text #

# Transformations

replace :: HasCallStack => Text -> Text -> Text -> Text #

# Folds

foldl1 :: HasCallStack => (Char -> Char -> Char) -> Text -> Char #

foldl1' :: HasCallStack => (Char -> Char -> Char) -> Text -> Char #

foldr1 :: HasCallStack => (Char -> Char -> Char) -> Text -> Char #

## Special folds

maximum :: HasCallStack => Text -> Char #

minimum :: HasCallStack => Text -> Char #

# Substrings

## Breaking strings

breakOn :: HasCallStack => Text -> Text -> (Text, Text) #

breakOnEnd :: HasCallStack => Text -> Text -> (Text, Text) #

## Breaking into many substrings

splitOn :: HasCallStack => Text -> Text -> [Text] #

# Searching

breakOnAll :: HasCallStack => Text -> Text -> [(Text, Text)] #

# Indexing

count :: HasCallStack => Text -> Text -> Int #