I have a NSData of bytes from where I want to subtract a string. The NSData object looks like this
01 00 00 04 40 00 00 00 00 41 41 41 41 48 47 5A 30 65 58 42 4E 4E 45 45 67 41
41 41 41 41 45 30 30 51 53 42 74 63 44 51 79 61 58 4E 76 62 51 41 41 41 2B 39
74 62 32 39 32 41 41 41 41 62 47 31 32 61 47 51 41 41 41 41 41 71 67 59 35 79
36 6F 47 4F 63 73 41 41 4B 78 45 41 41 43 34 41 41 41 42 41 41 41 42 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 51 41 41 41 41 41 41 41 41 41 41 41
I want to extract everything from the first occurrence of “40 00 00 00” to the first occurrence of “34”
How can I do that?
Thanks
marc
Not sure which bytes you want, here is extracted data in the range between “40 00 00 00” to the first occurrence of “34” and the data with that range removed:
NSLog output: