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

Directly access unicode scalars of characters

Swift 4 allows direct access to unicode scalars associated with characters:

let character: Character = “A”
let unicodeScalar = character.unicodeScalars

Done! Easy, isn’t it? Before you would have to convert the character to a String first and then try to access unicode scalar.

主站蜘蛛池模板: 南丰县| 崇仁县| 克东县| 凤山县| 宜宾市| 基隆市| 通道| 宁夏| 武鸣县| 桐城市| 寿宁县| 邳州市| 五河县| 鸡西市| 涞水县| 和林格尔县| 满洲里市| 高雄市| 柞水县| 崇阳县| 蕲春县| 绥棱县| 冀州市| 资中县| 星子县| 九台市| 凤冈县| 凤台县| 仪陇县| 石河子市| 武宁县| 玉林市| 天镇县| 新沂市| 广宁县| 和田县| 永安市| 天峻县| 西平县| 通城县| 太仆寺旗|