getting bytes out of NSData
getting bytes out of NSData
- Subject: getting bytes out of NSData
- From: Koen van der Drift <email@hidden>
- Date: Fri, 22 Jul 2005 20:26:02 -0400
Hi,
Which of these two methods is faster/more efficient to get bytes out
of an NSData object:
const char *data;
data = (const char *)[myData bytes];
aSymbol = [self symbolForChar: data[i]];
or:
unsigned char buffer;
[myData getBytes: &buffer range: NSMakeRange( i, 1 )];
aSymbol = [self symbolForChar: buffer];
thanks,
- Koen.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden