【发布时间】:2011-07-10 18:08:17
【问题描述】:
我需要在 Haskell 中将 Char 转换为 Int 吗?例如:
a = '\x2' -- a == 2
-- type of a should be Char
b = charToInt a -- b == 2
-- type of b should be Int
我怎样才能做到这一点?
【问题讨论】:
-
发现和使用hoogle。