VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

Just another Replacement for Replace() v. 1.1

selftaught  (17 Submissions)   Miscellaneous   VB Script   Intermediate   Wed 3rd February 2021

_Now_ it's as fast as it gets, folks. Yes, Faster than the code from xbeat.net. It beats the stuffing out of VB's intrinsic replace function even without the compiler optimizations. 5x-8x faster, even though it adds the ability to use delimiters and count the number of replacements. Uses a slightly modified string mapping technique from Chris_Lucas's post here a few years ago. Thanks to Rde for the SysAllocStringByteLen declare. That, plus some changes I made to calculate all the replacements before the return string is created are what account for the additional speed in the updated version of this post.

Rate Just another Replacement for Replace() v. 1.1 (7(7 Vote))

Download Just another Replacement for Replace() v. 1.1

Just another Replacement for Replace() v. 1.1 Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters