4

Suppose that my Haskell function is given an input, which is supposed to be the number of a unicode code point. How can one convert this to the corresponding character?

Example:

123 to '{'.

hippietrail
  • 15,848
  • 18
  • 99
  • 158
Derek Thurn
  • 14,953
  • 9
  • 42
  • 64

1 Answers1

6

Use toEnum. (Chars implement the Enum typeclass.)

dave4420
  • 46,404
  • 6
  • 118
  • 152