Re: Converting NSArray of NSString elements into binary?
Re: Converting NSArray of NSString elements into binary?
- Subject: Re: Converting NSArray of NSString elements into binary?
- From: "R.L. Grigg" <email@hidden>
- Date: Mon, 1 Oct 2007 19:04:01 -0700
On Oct 1, 2007, at 6:05 PM, Nick Zitzmann wrote:
On Oct 1, 2007, at 5:28 PM, R.L. Grigg wrote:
Is there some method to convert the NSArray of NSString elements
into binary byte values?
No.
Or do I have to go through each element and convert each NSString
into a NSNumber so I can put it's byteValue into a NSMutableData
one by one? Is this the wrong approach?
Using NSNumber is a little extreme; just using -intValue ought to
cover things unless you need 64-bit integers.
Hmm, I wish there was a -charValue method for NSString. This still
needs a step to go from the integers that intValue gives me to byte
values for putting into NSData. I guess there's no graceful way to
accomplish this.
Russ
_______________________________________________
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