VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Super Fast InStr Replacement

by Chris_Lucas (5 Submissions)
Category: VB function enhancement
Compatability: Visual Basic 3.0
Difficulty: Advanced
Date Added: Wed 3rd February 2021
Rating: (11 Votes)

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

Download Super Fast InStr Replacement

Download Super Fast InStr Replacement (2 KB)

Super Fast InStr Replacement Comments

No comments have been posted about Super Fast InStr Replacement. Why not be the first to post a comment about Super Fast InStr Replacement.

Post your comment

Subject:
Message:
0/1000 characters