Hi 4tH-ers!
I know what you're thinking: "INSTR? Why? Didn't we have SEARCH?" - and you would be right. But I never really liked what SEARCH came up with as a result. And I think it's horrible to implement.
INSTR just returns the position (either a pointer or an index) or a flag if it went wrong. Plus - and here it comes - it is 50% - 200% faster than SEARCH. It does this by first evaluating the character at hand before calling COMPARE, while COMPARE is called for each character in SEARCH.
On my machine it does a million "finds" per second in case insensitive mode. That's not too shabby IMHO. Fun fact: I developed this one first on uBasic/4tH before porting it to 4tH.
Hans Bezemer