Je me demande comment je peux convertir un Char en un Int. E.g.Convertir Char en Int
a = '\x2' -- a == 2
-- type of a should be Char
b = charToInt a -- b == 2
-- type of b should be Int
Mais je suis pas idée:/
Merci à l'avance
Je me demande comment je peux convertir un Char en un Int. E.g.Convertir Char en Int
a = '\x2' -- a == 2
-- type of a should be Char
b = charToInt a -- b == 2
-- type of b should be Int
Mais je suis pas idée:/
Merci à l'avance
Découvrez et utilisez [hoogle] (http://www.haskell.org/hoogle/?hoogle=Char+-%3E+Int). –