I have a binary file that is a a bunch of consequtive
type x = record
header: array[1..256] of byte;
data: array[1..10000] of single;
end
The spec calls for a text string of data to appear at the same location of the header in each of these records. We'll it doesn't. It may move around a little or even sometimes the first of the string is missed and only partial data is written to the header.
I need to search for the head of the wanted string, allowing it to move 10-20 bytes or so and retrieve the index into the array for the head of the string. If it's not found within some reasonable range, return -1.
I can't make anything work. I need something like the PosEx function that will find a substring in a byte array.
Any help?
Thanks
Bob
type x = record
header: array[1..256] of byte;
data: array[1..10000] of single;
end
The spec calls for a text string of data to appear at the same location of the header in each of these records. We'll it doesn't. It may move around a little or even sometimes the first of the string is missed and only partial data is written to the header.
I need to search for the head of the wanted string, allowing it to move 10-20 bytes or so and retrieve the index into the array for the head of the string. If it's not found within some reasonable range, return -1.
I can't make anything work. I need something like the PosEx function that will find a substring in a byte array.
Any help?
Thanks
Bob