官术网_书友最值得收藏!

Converting to a character using the chr method

Integer values can be converted to the corresponding character. The correspondence is defined by the Unicode codepoint. 

In the case of values below 256, it coincides with the ASCII table. Considering the following code snippet:

say 65.chr; # prints A

Higher values produce characters from the Unicode tables, as shown here:

say 8594.chr; # →

The same result can be obtained using the hexadecimal representation, as shown here:

say 0x2192.chr; # →
主站蜘蛛池模板: 乐安县| 东乡县| 封丘县| 兴海县| 米脂县| 酒泉市| 两当县| 卢龙县| 兴仁县| 安塞县| 稻城县| 嘉义县| 奇台县| 万源市| 新津县| 开化县| 垣曲县| 郴州市| 顺平县| 临朐县| 香港 | 东乡县| 淮阳县| 化德县| 泰和县| 禄劝| 民权县| 油尖旺区| 平邑县| 错那县| 清水河县| 安义县| 罗江县| 肃宁县| 芦溪县| 武义县| 扎赉特旗| 琼海市| 麟游县| 股票| 新营市|