Provides a mechanism to concatenate strings. The StringBuilder class represents a mutable string of characters and provides a mechanism to concatenate a sequence of strings.
Creates a new instance of StringBuilder and optionally accepts initial text to concatenate. You can specify a string in the optional initialText parameter to initialize the value of the StringBuilder instance.
(Optional) The string that is used to initialize the value of the instance. If the value is null, the new StringBuilder instance will contain an empty string ("").
Appends a copy of a specified string to the end of the Sys.StringBuilder instance. Use the append method to append a copy of a specified string to the end of a StringBuilder instance. If text is an empty string, null, or undefined, the StringBuilder instance remains unchanged.
The string to append to the end of the StringBuilder instance.
Appends a string with a line terminator to the end of the Sys.StringBuilder instance. Use the appendLine method to append a specified string and a line terminator to the end of a Stringbuilder instance. The line terminator is a combination of a carriage return and a newline character. If no string is specified in text, only the line terminator is appended.
(Optional) The string to append with a line terminator to the end of the StringBuilder instance.
Clears the contents of the Sys.StringBuilder instance. Use the clear method to clear the StringBuilder instance of its current contents.
Determines whether the Sys.StringBuilder object has content. Use the isEmpty method to determine whether a StringBuilder instance has any content. If you append an empty string, null, or an undefined value to an empty StringBuilder instance, the instance remains empty and unchanged.
boolean
true if the StringBuilder instance contains no elements; otherwise, false.
Creates a string from the contents of a Sys.StringBuilder instance, and optionally inserts a delimiter between each element of the created string. Use the toString method to create a string from the contents of a StringBuilder instance. Use the toString method with the optional separator parameter to insert a specified string delimiter between each element of the created string.
(Optional) A string to append between each element of the string that is returned.
string
A string representation of the StringBuilder instance. If separator is specified, the delimiter string is inserted between each element of the returned string.