| |||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||
Description | |||||||||||||||||||||||||||||||||
utility functions Version : $Id: Util.hs,v 1.3 20060501 18:56:24 hxml Exp $ | |||||||||||||||||||||||||||||||||
Synopsis | |||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||
Documentation | |||||||||||||||||||||||||||||||||
stringTrim :: String -> String | |||||||||||||||||||||||||||||||||
remove leading and trailing whitespace with standard Haskell predicate isSpace | |||||||||||||||||||||||||||||||||
stringToUpper :: String -> String | |||||||||||||||||||||||||||||||||
convert string to upercase with standard Haskell toUpper function | |||||||||||||||||||||||||||||||||
normalizeNumber :: String -> String | |||||||||||||||||||||||||||||||||
Removes leading / trailing whitespaces and leading zeros | |||||||||||||||||||||||||||||||||
normalizeWhitespace :: String -> String | |||||||||||||||||||||||||||||||||
Reduce whitespace sequences to a single whitespace | |||||||||||||||||||||||||||||||||
escapeURI :: String -> String | |||||||||||||||||||||||||||||||||
Escape all disallowed characters in URI references (see http://www.w3.org/TR/xlink/#link-locators) | |||||||||||||||||||||||||||||||||
textEscapeXml :: String -> String | |||||||||||||||||||||||||||||||||
escape XML chars < and ampercent by transforming them into character references, used for escaping text nodes see also : attrEscapeXml | |||||||||||||||||||||||||||||||||
stringEscapeXml :: String -> String | |||||||||||||||||||||||||||||||||
escape XML chars <, >, ", and ampercent by transforming them into character references see also : attrEscapeXml | |||||||||||||||||||||||||||||||||
attrEscapeXml :: String -> String | |||||||||||||||||||||||||||||||||
escape XML chars in attribute values, same as stringEscapeXml, but none blank whitespace is also escaped see also : stringEscapeXml | |||||||||||||||||||||||||||||||||
stringToInt :: Int -> String -> Int | |||||||||||||||||||||||||||||||||
stringToHexString :: String -> String | |||||||||||||||||||||||||||||||||
convert a string into a hexadecimal string applying charToHexString see also : charToHexString | |||||||||||||||||||||||||||||||||
charToHexString :: Char -> String | |||||||||||||||||||||||||||||||||
convert a char (byte) into a 2-digit hexadecimal string see also : stringToHexString, intToHexString | |||||||||||||||||||||||||||||||||
intToHexString :: Int -> String | |||||||||||||||||||||||||||||||||
convert a none negative Int into a hexadecimal string see also : charToHexString | |||||||||||||||||||||||||||||||||
hexStringToInt :: String -> Int | |||||||||||||||||||||||||||||||||
convert a string of hexadecimal digits into an Int | |||||||||||||||||||||||||||||||||
decimalStringToInt :: String -> Int | |||||||||||||||||||||||||||||||||
convert a string of digits into an Int | |||||||||||||||||||||||||||||||||
doubles :: Eq a => [a] -> [a] | |||||||||||||||||||||||||||||||||
take all elements of a list which occur more than once. The result does not contain doubles. (doubles . doubles == doubles) | |||||||||||||||||||||||||||||||||
singles :: Eq a => [a] -> [a] | |||||||||||||||||||||||||||||||||
drop all elements from a list which occur more than once. | |||||||||||||||||||||||||||||||||
noDoubles :: Eq a => [a] -> [a] | |||||||||||||||||||||||||||||||||
remove duplicates from list | |||||||||||||||||||||||||||||||||
Produced by Haddock version 0.8 |