hpp-0.3.0.0: A Haskell pre-processor

Safe HaskellSafe
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.

trimSpaces :: String -> String Source

Trim trailing spaces from a String

breakOn :: String -> String -> (String, String) Source

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

breakOn needle haystack finds the first instance of needle in haystack. The first component of the result is the prefix of haystack before needle is matched. The second is the remainder of haystack, starting with the match.

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

Used to make switching to the text package easier.