Safe Haskell | Safe-Inferred |
---|
Extra functions and classes for dealing with Strings.
- module Data.String
- module Data.Char
- lower :: String -> String
- upper :: String -> String
- trim :: String -> String
- ellipsize :: Int -> String -> String
- ellipsizeFromFront :: Int -> String -> String
- ordSuffix :: Integral n => n -> String
- pad :: Int -> String -> String -> String
- stringToMaybe :: String -> Maybe String
- class ToString a where
Re-exports
module Data.String
module Data.Char
Data operations
ellipsizeFromFront :: Int -> String -> StringSource
Limit the length of a string and ellipsize it if it goes over a certain length.
Pad the string with the given string.
stringToMaybe :: String -> Maybe StringSource
If a trimmed string is empty, return nothing.