Re: NSData problems and viewing buffer data in hex
Re: NSData problems and viewing buffer data in hex
- Subject: Re: NSData problems and viewing buffer data in hex
- From: Jens Alfke <email@hidden>
- Date: Wed, 07 May 2014 09:27:15 -0700
On May 7, 2014, at 9:21 AM, William Squires <email@hidden> wrote:
> Quickie question: Does [NSData getBytes:range:] return <range>.length bytes into the buffer specified, even if some of the bytes may be '\0' (terminating null), so long as range is valid?
If it’s a valid sub-range of the data it’ll copy range.length bytes into the buffer, otherwise it’ll raise an exception.
Whether or not the bytes are zeros has nothing to do with it … NSData doesn’t care what the data is, it’s just a blob.
—Jens
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden