def Digit.to_char
bend-trace-context@0.2.0.0 · src/hex.bend:34
import bend-trace-context@0.2.0.0/src/hex.bend as Hex
import Base
34
35def Digit.to_char(digit: Digit) -> Char:
36 match digit:
37 case H0{}:
38 '0'
39 case H1{}:
40 '1'
41 case H2{}:
42 '2'
43 case H3{}:
44 '3'
45 case H4{}:
46 '4'
47 case H5{}:
48 '5'
49 case H6{}:
50 '6'
51 case H7{}:
52 '7'
53 case H8{}:
54 '8'
55 case H9{}:
56 '9'
57 case Ha{}:
58 'a'
59 case Hb{}:
60 'b'
61 case Hc{}:
62 'c'
63 case Hd{}:
64 'd'
65 case He{}:
66 'e'
67 case Hf{}:
68 'f'