Attached is a function to find a string within the other. The test program shows that it is considerably faster than InString (or t least on my home computer does). Further tests and improvements will be highly appreciated.
Regards,
Nick
PS thanks to Stan and Ultrano for the help concearning the objects, but, as you will see, I couldn't make a working exe on this computer (mostly because of my little knowledge in C). Anyway, on my home computer I have Visual Studio 6, and it works fine.
[attachment deleted by admin]
you could test it againts these http://www.masm32.com/board/index.php?topic=6181.0, on the second page I believe lingo posts an even faster instring alg then his previous which was dominating the rest, so you compare it againts that one.
I've included the FindStringA algo in lingos testproc and got this (AMD64 FX57) :
----------------------
105 average msvcrt strstr
90 average finstr
46 average InStringL
130 average FindStringA
193 average InString
----------------------
Ulli
Yep, they beat the hell out of me... :) A proper search before posting this topic would help my ego a lot :) :) :)
Nick