[InStr] What happens if the string holds mixed data ?

result = InStr([start,] source, find)

What happens if the source string holds mixed data: first character is binary, followed by a string followed by binary data, etc. ?

Actually, I always get 0 even when the find string exists (and I am awaiting 1 as the position of the string).

What do I want to achieve ?
Some files (like image files) have a tag at the beginning (usually at character position 1, 0 is AFAIK a binary value). I want to be sure the internal tag = the file extension.

Instr can only work well if the encoding is defined and correct.

How would you get mixed stuff there?

“InStrB” exists for that purpose.

Thank you Christian.

How would you get mixed stuff there?
The testing data is a PNG file. The string .png is stored after a byte ($89).

I do not have handly other image kinds (GIF, TIF/TIFF/JPG/JPEG…) to make further testings.

Jean-Yves: I will test that, thanks.

And the winner is… Thanks.