|
|
|
| Description |
| Utility functions used internally in the Lucu httpd. These
functions may be useful too for something else.
|
|
| Synopsis |
|
|
|
| Documentation |
|
| splitBy :: (a -> Bool) -> [a] -> [[a]] |
splitBy (== ':') "ab:c:def"
==> ["ab", "c", "def"]
|
|
| joinWith :: [a] -> [[a]] -> [a] |
joinWith ":" ["ab", "c", "def"]
==> "ab:c:def"
|
|
| trim :: (a -> Bool) -> [a] -> [a] |
trim (== '_') "__ab_c__def___"
==> "ab_c__def"
|
|
| isWhiteSpace :: Char -> Bool |
| isWhiteSpace c is True iff c is one of SP, HT, CR
and LF.
|
|
| quoteStr :: String -> String |
quoteStr "abc"
==> "\"abc\""
quoteStr "ab\"c"
==> "\"ab\\\"c\""
|
|
| parseWWWFormURLEncoded :: String -> [(String, String)] |
parseWWWFormURLEncoded "aaa=bbb&ccc=ddd"
==> [("aaa", "bbb"), ("ccc", "ddd")]
|
|
| Produced by Haddock version 2.1.0 |