I have an array of bytes that looks something like this:
byte[] exampleArray = new byte[]
{ 0x01, 0x13, 0x10, 0xe2, 0xb9, 0x13, 0x10, 0x75, 0x3a, 0x13 };
My ultimate goal is to split this array into a helper array anytime I see a sequence { 0x13, 0x10 }. So my desired result in an example array:
{ 0x01 }
{ 0xe2, 0xb9 }
{ 0x75, 0x3a, 0x13 }
Ideally, I also need to know that the final array { 0x75, 0x3a, 0x13 }did not finish the search sequence so that I could work with this as a special case.
Any thoughts on a better approach?
source
share