by Robin Schuil (6 Submissions)
Category: String Manipulation
Compatability: Visual Basic 3.0
Difficulty: Advanced
Date Added: Wed 3rd February 2021
Rating:
(11 Votes)

The SpeedString class boost performance on string concatenation. Almost every VB developer uses strValue = strValue & NewData as concatenation. The SpeedString class does the same, but a few hunderds times faster (something up to 1000 times).
This project demonstrates the use of my SpeedString class and compares the execution times of both methods.
Inputs
Syntax: SpeedString.Append StringValue, [StringLength]
The length is optional. Note that it also provides a faster method for the LEFT method.
Code Returns
Syntax: SpeedString.Data
Returns as string containing the concatenated data.
API DeclarationsPrivate Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (Destination As Any, Source As Any, ByVal Length As Long)