Finding position of a sequence in a UInt8 array?

It’s the starting index for the search, the same as the start argument of findnext — it says to search starting at byte 1. Passing 2 means to search starting at byte 2.

In this way, you can find multiple occurrences:

i = Base._searchindex(a, [0x90,0xea,0x00], 1)
Base._searchindex(a, [0x90,0xea,0x00], i+1) # finds the second occurrence, if any
1 Like