开发者

Haskell: convert unicode integer to actual unicode character

开发者 https://www.devze.com 2022-12-25 09:18 出处:网络
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 t开发者_开发知识库he corresponding character?

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 t开发者_开发知识库he corresponding character?

Example:

123 to '{'.


Use toEnum. (Chars implement the Enum typeclass.)

0

精彩评论

暂无评论...
验证码 换一张
取 消