"The code is exactly
how I would like to write code and the algorithms used are very
efficient and well-documented."
Van T. Dinh, Microsoft MVP
|
|
Class: CConCat
High performance concatenation of large strings When concatenating large strings on the order of 50kb or larger (for example, building an RTF string), the length of time to complete becomes exponentially longer. This is because Visual Basic re-allocates the string each time it is concatenated. This class implements an alternative to normal concatenation that does not re-allocate the string each time it is concatenated.
|
Procedure Name
|
Type
|
Description
|
|
(Declarations)
|
Declarations
|
Declarations and private variables for the CConCat class
|
|
Text
|
Property
|
Sets the text string.
The Get method of this property trims off any text leftover in the pre-allocated internal string. This prevents up to 50k of spaces from being returned on the end of the string.
|
|
Append
|
Method
|
Appends a string to the end of the internal string.
This function uses the trick of pre-allocating the internal string that is being appended to. This is what gives the performance benefits of this class.
|
|
Class_Initialize
|
Initialize
|
Set initial values to defaults which may be overridden with property settings
|
Overview of Total Visual SourceBook
The source code in Total Visual
SourceBook includes modules and classes for Microsoft Access, Visual
Basic 6 (VB6), and Visual Basic for Applications (VBA) developers. Easily
add this professionally written, tested, and documented royalty-free code
into your applications to simplify your application development efforts.
Additional Resources
|
|