TextBuilder Data Type
Version: Available or changed with runtime version 1.0.
Represents a lightweight wrapper for the .Net implementation of StringBuilder.
The following methods are available on instances of the TextBuilder data type.
|Appends a copy of the specified string to this TextBuilder instance.
|Appends a copy of the specified string followed by the default line terminator to the end of the current TextBuilder object. If this parameter is omitted, only the line terminator will be appended.
|Gets or sets the maximum number of characters that can be contained in the memory allocated by the current instance.
|Removes all characters from the current TextBuilder instance.
|Ensures that the capacity of this TextBuilder instance is at least the specified value.
|Inserts a string into this TextBuilder instance at the specified character position.
|Gets or sets the length of this TextBuilder instance.
|Gets the maximum capacity of this TextBuilder instance.
|Removes the specified range of characters from this TextBuilder instance.
|Replaces all occurrences of a specified string in this TextBuilder instance with another specified string.
|Replace(Text, Text, Integer, Integer)
|Replaces, within a substring of this instance, all occurrences of a specified string in this TextBuilder instance with another specified string.
|Converts the value of this TextBuilder instance to a Text.
|Converts the value of a substring of this TextBuilder instance to a Text.
The TextBuilder data type is one-based indexed, that is, the indexing begins with 1.
The Text Data Type is a value type, such that every time you use a method on it, you create a new string object in memory. This requires a new allocation of space. In situations where you need to perform repeated modifications to a string, the overhead associated with creating a Text Data Type can be costly.
The TextBuilder data type is a reference type, which holds a pointer elsewhere in memory. For performance reasons, we recommend you to use it when you want to modify a string without creating a new object. For example, using TextBuilder data type can boost performance when concatenating many strings together in a loop.