ios - 谁有研究过NSMutabelData中length与bytes的关系
怪我咯
怪我咯 2017-04-17 17:59:29
0
1
616

1.length 是否为8bit为1个length
2.bytes是否和length相等
3.如果第一个问题成立那么一个lenth的意义或者代表的什么意思,为什么不用length取代bytes
4.bytes存在的意义

怪我咯
怪我咯

走同样的路,发现不同的人生

reply all(1)
PHPzhong

length is an NSUInteger type data, representing the length of data, and bytes is a pointer, pointing to the content of data. There is no question of equality, inequality, or whether they can be replaced with each other.

@property(readonly) NSUInteger length
The number of bytes contained by the data object.


@property(readonly) const void *bytes
A pointer to the receiver’s contents. 
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!