Objective-C-字符和单字符之间的区别? [英] objective-c - difference between char and unichar?

查看:64
本文介绍了Objective-C-字符和单字符之间的区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我搜索了很多有关 unichar char 的区别的信息,但是没有一个明确的概念.还告诉我有关 char [] unichar [] 的区别.

I searched a lot about the difference of unichar and char but did't get any clear concept. also tell me difference about char[] and unichar[].

何时使用 char unichar ??

推荐答案

char 是8位,代表任意8位数字,UTF-8代码单元或代码单元用其他一些字符编码.

char is 8 bits and represents either an arbitrary 8-bit number, or a UTF-8 code unit, or a code unit in some other character encoding.

unichar 是16位,代表UTF-16代码单元.

unichar is 16 bits and represents a UTF-16 code unit.

这篇关于Objective-C-字符和单字符之间的区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆