rio-0.1.18.0: A standard library for Haskell

Safe Haskell | Safe
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 :: Text -> Char
- last :: Text -> Char
- tail :: Text -> Text
- init :: Text -> Text
- replace :: Text -> Text -> Text -> Text
- foldl1 :: (Char -> Char -> Char) -> Text -> Char
- foldl1' :: (Char -> Char -> Char) -> Text -> Char
- foldr1 :: (Char -> Char -> Char) -> Text -> Char
- maximum :: Text -> Char
- minimum :: Text -> Char
- breakOn :: Text -> Text -> (Text, Text)
- breakOnEnd :: Text -> Text -> (Text, Text)
- splitOn :: Text -> Text -> [Text]
- breakOnAll :: Text -> Text -> [(Text, Text)]
- count :: Text -> Text -> Int

# Basic interface

head :: Text -> Char #

last :: Text -> Char #

tail :: Text -> Text #

init :: Text -> Text #

# Transformations

replace :: Text -> Text -> Text -> Text #

# Folds

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

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

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

## Special folds

maximum :: Text -> Char #

minimum :: Text -> Char #

# Substrings

## Breaking strings

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

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

## Breaking into many substrings

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

# Searching

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

# Indexing

count :: Text -> Text -> Int #