hpp-0.6.4: A Haskell pre-processor
Safe HaskellSafe-Inferred
LanguageHaskell2010

Hpp.String

Description

HELPERS for working with Strings

Synopsis

Documentation

stringify :: String -> String Source #

Stringification puts double quotes around a string and backslashes before existing double quote characters and backslash characters.

unquote :: String -> String Source #

Remove double quote characters from the ends of a string.

stripAngleBrackets :: String -> String Source #

Remove angle brackets from the ends of a string.

trimSpaces :: String -> String Source #

Trim trailing spaces from a String

breakOn :: [(String, t)] -> String -> Maybe (t, String, String) Source #

Similar to the function of the same name in the text package.

breakOn needles haystack finds the first instance of an element of needles in haystack. The first component of the result is the needle tag, the second component is the prefix of haystack before the matched needle, the third component is the remainder of the haystack after the needle..

cons :: a -> [a] -> [a] Source #

Used to make switching to the text package easier.