is there a better way to ask for a hex formatted number?

29 Apr
2011
29 Apr
'11
5:11 p.m.
I am using this currently: makeHex n = "0x" ++ map toUpper (showHex n "") -- gives me 0xFF for example I know i can use printf but I am not sending this to output when I am doing the formatting.

29 Apr
29 Apr
5:23 p.m.
On Friday 29 April 2011 23:11:01, Sean Perry wrote:
I am using this currently:
makeHex n = "0x" ++ map toUpper (showHex n "") -- gives me 0xFF for example
I know i can use printf but I am not sending this to output when I am doing the formatting.
printf can also produce Strings: Prelude Text.Printf> printf "0x%x" 239 :: String "0xef" Prelude Text.Printf> printf "0x%X" 239 :: String "0xEF"
5134
Age (days ago)
5134
Last active (days ago)
1 comments
2 participants
participants (2)
-
Daniel Fischer
-
Sean Perry