On 02 Nov 2014, at 22:53, Patrick J. Collins <[email protected]> 
wrote:
> I am wondering if I have a file with contents like:
> 
> \ff\01\02\1a...
> 
> What is the easiest and best way to convert that into an NSArray of
> NSNumbers that I can traverse?

 You should probably try the Cocoa-Dev mailing list instead.

 That said, this sounds like a really bad idea. An NSNumber is a lot of 
overhead to store just a byte. In general, NSData sounds like a better choice 
here. Also, what does the file really contain? Does it contain binary bytes, or 
does it contain ASCII character sequences like backslash followed by two hex 
characters? If the former, just point NSData at it. If the latter, use NSString 
to load it, then NSScanner to actually turn the character sequences into binary 
bytes.

Cheers,
-- Uli Kusterer
“The Witnesses of TeachText are everywhere...”
http://zathras.de


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Objc-language mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/objc-language/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to