VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

A fast replace-function

Kristian S. Stangeland  (8 Submissions)   String Manipulation   Advanced   Wed 3rd February 2021

The Replace-function in VB6 is an extremely useful in many occasions, but unfortunately, it is as most string-functions in VB rather slow. Therefore I’ve tried to optimize this operation, and I must say the result is satisfying – it is nearly 50 times faster replacing 35.000 characters than the native Replace-function.
The code should also work in VB5, where the native function doesn’t even exist.

Inputs
As Replace in VB6, only that "Start" is now defining the position within the expression where the substring search is to begin.

Returns
The string replaced.

Rate A fast replace-function (14(14 Vote))

Download A fast replace-function

A fast replace-function Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters