Portability | GHC |
---|---|

Stability | experimental |

Maintainer | hans@hanshoglund.se |

Safe Haskell | None |

- toUpperChar :: Char -> Char
- toLowerChar :: Char -> Char
- toUpperString :: String -> String
- toLowerString :: String -> String
- toCapitalString :: String -> String
- withPrefix :: [a] -> [a] -> [a]
- withSuffix :: [a] -> [a] -> [a]
- sep :: a -> [a] -> [a]
- pre :: a -> [a] -> [a]
- post :: a -> [a] -> [a]
- wrap :: a -> a -> [a] -> [a]
- concatSep :: [a] -> [[a]] -> [a]
- concatPre :: [a] -> [[a]] -> [a]
- concatPost :: [a] -> [[a]] -> [a]
- concatWrap :: [a] -> [a] -> [[a]] -> [a]
- divideList :: Int -> [a] -> [[a]]
- breakList :: Int -> [a] -> [a] -> [a]
- concatMapM :: (Monad f, Functor f) => (a -> f [b]) -> [a] -> f [b]

## String and Char stuff

toUpperChar :: Char -> CharSource

Synonym for `toUpper`

toLowerChar :: Char -> CharSource

Synonym for `toLower`

toUpperString :: String -> StringSource

Synonym for 'fmap Char.toUpper'

toLowerString :: String -> StringSource

Synonym for 'fmap Char.toLower'

toCapitalString :: String -> StringSource

Convert a string to use upper case for the leading letter and lower case for remaining letters.

## List stuff

withPrefix :: [a] -> [a] -> [a]Source

Synonym for '(++)'

withSuffix :: [a] -> [a] -> [a]Source

Synonym for 'flip (++)'

Separate a list by the given element.

Equivalent to `intersperse`

concatPost :: [a] -> [[a]] -> [a]Source

concatWrap :: [a] -> [a] -> [[a]] -> [a]Source

divideList :: Int -> [a] -> [[a]]Source

Divide a list into parts of maximum length n.

breakList :: Int -> [a] -> [a] -> [a]Source

Break up a list into parts of maximum length n, inserting the given list as separator.
Useful for breaking up strings, as in `breakList 80 n str`

.

## Monad stuff

concatMapM :: (Monad f, Functor f) => (a -> f [b]) -> [a] -> f [b]Source

Break up a list into parts of maximum length n, inserting the given list as separator.
Useful for breaking up strings, as in `breakList 80 n str`

.