Re: [NSMutableData resetDataRangeTo:(NSRange)range];
Re: [NSMutableData resetDataRangeTo:(NSRange)range];
- Subject: Re: [NSMutableData resetDataRangeTo:(NSRange)range];
- From: Jens Alfke <email@hidden>
- Date: Mon, 14 Jul 2014 11:54:46 -0700
On Jul 14, 2014, at 11:48 AM, Carl Hoefs <email@hidden> wrote:
> Yes, I guess it's the semantics that threw me. I was attempting to "insertBytesInRange" not "replaceBytesInRange", so I had it in my mind that the one couldn't do the other. But that's the whole purpose of the NSRange. Very cool.
The equivalent function in the ‘classic’ Mac OS had the very appropriate name of Munger( ) since it would munge bytes around in a heap block. Knowing how to use Munger was a sign of geek cred in the old (80s-90s) Mac dev community.
( http://www.mactech.com/articles/mactech/Vol.12/12.05/Handles2/index.html )
—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