:: Char -> Int

Convert a single digit Char to the corresponding Int. This function fails unless its argument satisfies isHexDigit, but recognises both upper- and lower-case hexadecimal digits (that is, '0'..'9', 'a'..'f', 'A'..'F').

Examples

Characters '0' through '9' are converted properly to 0..9:
>>> map digitToInt ['0'..'9']
[0,1,2,3,4,5,6,7,8,9]
Both upper- and lower-case 'A' through 'F' are converted as well, to 10..15.
>>> map digitToInt ['a'..'f']
[10,11,12,13,14,15]

>>> map digitToInt ['A'..'F']
[10,11,12,13,14,15]
Anything else throws an exception:
>>> digitToInt 'G'
*** Exception: Char.digitToInt: not a digit 'G'

>>> digitToInt '♥'
*** Exception: Char.digitToInt: not a digit '\9829'
The fromEnum method restricted to the type Char.
Return length of an individual Char.
Returns the display width of a character. Assumes all characters with unknown widths are 0 width.
Returns width of a character in a monospace font: 0 for a combining character, 1 for a regular character, 2 for an East Asian wide character. Ambiguous characters are treated as width 1.
Converts an ASCII character to its corresponding numeric value between 0 and 127
toInt Null == 0
toInt CapitalLetterA == 6
toInt SmallLetterA == 97
toInt Delete == 127
Returns the combining class of a character.
Binding to the native wcwidth.
Converts an ISBN-10 character to a numeric value. Valid input characters include 0-9 as well as X.
Calls perror to indicate an unknown format letter for a given type.
Get the dimension of an object whose vector space is an instance of HasLinearMap, e.g. transformations, paths, diagrams, etc.
Convert to an Int. It is implementation-dependent what fromEnum returns when applied to a value that is too large to fit in an Int.
Computes the storage requirements (in bytes) of the argument. The value of the argument is not used.
Computes the alignment constraint of the argument. An alignment constraint x is fulfilled by any address divisible by x. The alignment must be a power of two if this instance is to be used with alloca or allocaArray. The value of the argument is not used.