VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

Super Fast InStr Replacement

Chris_Lucas  (5 Submissions)   VB function enhancement   Visual Basic 3.0   Advanced   Wed 3rd February 2021

This code runs as much as 5000 times faster than VB's InStr function! I've used the Boyer-Moore algorithm which is the fastest string search algorithm in the world. The longer strings you feed this function, the harder it wails on VB's. Switching to vbTextCompare is like lighting the afterburners. Please vote and leave feedback!

Side Effects
Do not us vbTextCompare mode if one or more of your strings contain ligatures (Æ,æ,Œ,œ,Þ, and þ), the German sharp s (ß), or non-ANSI characters. These characters are considered two characters in vbTextCompare mode and are not easily accounted for by the Boyer-Moore algorithm.

Rate Super Fast InStr Replacement (12(12 Vote))

Download Super Fast InStr Replacement

Super Fast InStr Replacement Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters