简体   繁体   中英

getting number of bytes from an instance of NSMutableData

I want to be able to determine if the number of bytes in an instance of NSMutableData is equal to zero. How would I do this?

Simple:

if([data length] == 0) {
  //do something
}

where data is your NSMutableData object.

NSMutableData inherits from NSData, so it gains all of the members of NSData.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM