Re: Looking for bytes in NSData
Re: Looking for bytes in NSData
- Subject: Re: Looking for bytes in NSData
- From: Chris Ridd <email@hidden>
- Date: Sun, 27 Oct 2002 17:30:15 +0000
On 27/10/02 4:20 pm, Andy Lee <email@hidden> wrote:
>
At 7:03 AM -0600 10/27/02, Chris Vincent wrote:
>
> Is there a way to look for a sequence of bytes in NSData? I'm looking
>
> for something similar to NSString's -rangeOfString. Is this possible?
>
>
I've been using NSData's -bytes method combined with the C function
>
strstr(). Do a "man strstr" for details and variants on strstr().
You should avoid strstr() because it won't handle NUL bytes in either value
correctly from your point of view.
>
If anyone knows a smarter way, please let us both know!
Having said that, I haven't found any obvious method (or CFData function) to
do what you want.
Cheers,
Chris
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.