Agda- A dependently typed functional programming language and proof assistant

Safe HaskellNone




quote :: String -> String Source

quote adds double quotes around the string, replaces newline characters with n, and escapes double quotes and backslashes within the string. This is different from the behaviour of show:

> putStrLn $ show "\x2200"
> putStrLn $ quote "\x2200"

(The code examples above have been tested using version of the base library.)

showIndex :: (Show i, Integral i) => i -> String Source

Shows a non-negative integer using the characters ₀-₉ instead of 0-9.

addFinalNewLine :: String -> String Source

Adds a final newline if there is not already one.

indent :: Integral i => i -> String -> String Source

Indents every line the given number of steps.

showThousandSep :: Show a => a -> String Source

Show a number using comma to separate powers of 1,000.

ltrim :: String -> String Source

Remove leading whitespace.

rtrim :: String -> String Source

Remove trailing whitespace.

trim :: String -> String Source

Remove leading and trailing whitesapce.