StringBuilder
Overview
Represents a mutable set of characters.
Unlike String whos buffer is read only, StringBuilder allows its content to be changed. Since StringBuilder can automatically increase its buffer and is optimized for character data manipulation it is usually better to use this class when you perform extensive string modifications.
Location
- Reference: Sugar
- Namespace: Sugar
Append (String): StringBuilder mapped
Appends a copy of the specified string to the buffer.
method Append(Value: String): StringBuilder
StringBuilder Append(String Value)
func Append(_ Value: String) -> StringBuilder
StringBuilder Append(String Value)
Function Append(Value As String) As StringBuilder
Parameters:
- Value: The string to append.
Append (Char, Int32): StringBuilder mapped
Appends a given number of character into the buffer.
method Append(Value: Char; RepeatCount: Int32): StringBuilder
StringBuilder Append(Char Value, Int32 RepeatCount)
func Append(_ Value: Char, _ RepeatCount: Int32) -> StringBuilder
StringBuilder Append(Char Value, Int32 RepeatCount)
Function Append(Value As Char, RepeatCount As Int32) As StringBuilder
Parameters:
- Value: The character to append.
- RepeatCount: Number of copies.
Append (String, Int32, Int32): StringBuilder mapped
Appends a copy of a specified substring to the buffer.
method Append(Value: String; StartIndex: Int32; Count: Int32): StringBuilder
StringBuilder Append(String Value, Int32 StartIndex, Int32 Count)
func Append(_ Value: String, _ StartIndex: Int32, _ Count: Int32) -> StringBuilder
StringBuilder Append(String Value, Int32 StartIndex, Int32 Count)
Function Append(Value As String, StartIndex As Int32, Count As Int32) As StringBuilder
Parameters:
- Value: The string to append.
- StartIndex: Strarting position of a substring.
- Count: Number of characters to append.
AppendLine mapped
Appends a string that specifies new line into the current buffer.
method AppendLine: StringBuilder
StringBuilder AppendLine()
func AppendLine() -> StringBuilder
StringBuilder AppendLine()
Function AppendLine() As StringBuilder
AppendLine (String): StringBuilder mapped
Appends a copy of the specified string and new line characters into the buffer.
method AppendLine(Value: String): StringBuilder
StringBuilder AppendLine(String Value)
func AppendLine(_ Value: String) -> StringBuilder
StringBuilder AppendLine(String Value)
Function AppendLine(Value As String) As StringBuilder
Parameters:
- Value: The string to append.
Chars
Gets or sets the character at the specified position.
Clear mapped
Removes all characters.
method Clear
void Clear()
func Clear()
void Clear()
Sub Clear()
Delete mapped
Removes a range of characters.
method Delete(StartIndex: Int32; Count: Int32): StringBuilder
StringBuilder Delete(Int32 StartIndex, Int32 Count)
func Delete(_ StartIndex: Int32, _ Count: Int32) -> StringBuilder
StringBuilder Delete(Int32 StartIndex, Int32 Count)
Function Delete(StartIndex As Int32, Count As Int32) As StringBuilder
Parameters:
- StartIndex: Starting position of the range.
- Count: Number of characters to remove.
Insert mapped
Inserts string into a specified position.
method Insert(Offset: Int32; Value: String): StringBuilder
StringBuilder Insert(Int32 Offset, String Value)
func Insert(_ Offset: Int32, _ Value: String) -> StringBuilder
StringBuilder Insert(Int32 Offset, String Value)
Function Insert(Offset As Int32, Value As String) As StringBuilder
Parameters:
- Offset: The starting position in the buffer.
- Value: The string to insert.
Length
Gets or sets length of the data.
property Length: Int32 read write;
Int32 Length { get; set; }
var Length: Int32 { get{} set{} }
Int32 Length { __get; __set; }
Property Length() As Int32
Replace mapped
Replaces data withing specified range with a string.
method Replace(StartIndex: Int32; Count: Int32; Value: String): StringBuilder
StringBuilder Replace(Int32 StartIndex, Int32 Count, String Value)
func Replace(_ StartIndex: Int32, _ Count: Int32, _ Value: String) -> StringBuilder
StringBuilder Replace(Int32 StartIndex, Int32 Count, String Value)
Function Replace(StartIndex As Int32, Count As Int32, Value As String) As StringBuilder
Parameters:
- StartIndex: Starting position of the range.
- Count: Number of characters to replace.
- Value: The string to insert.
Returns a substring starting from specified position.
Parameters:
- StartIndex: Starting position of the substring.
Returns a substring with a given range.
Parameters:
- StartIndex: Starting position of the substring.
- Count: Number of characters in the substring.
Chars
Gets or sets the character at the specified position.
Length
Gets or sets length of the data.
Append (String): StringBuilder mapped
Appends a copy of the specified string to the buffer.
method Append(Value: String): StringBuilder
StringBuilder Append(String Value)
func Append(_ Value: String) -> StringBuilder
StringBuilder Append(String Value)
Function Append(Value As String) As StringBuilder
Parameters:
- Value: The string to append.
Append (Char, Int32): StringBuilder mapped
Appends a given number of character into the buffer.
method Append(Value: Char; RepeatCount: Int32): StringBuilder
StringBuilder Append(Char Value, Int32 RepeatCount)
func Append(_ Value: Char, _ RepeatCount: Int32) -> StringBuilder
StringBuilder Append(Char Value, Int32 RepeatCount)
Function Append(Value As Char, RepeatCount As Int32) As StringBuilder
Parameters:
- Value: The character to append.
- RepeatCount: Number of copies.
Append (String, Int32, Int32): StringBuilder mapped
Appends a copy of a specified substring to the buffer.
method Append(Value: String; StartIndex: Int32; Count: Int32): StringBuilder
StringBuilder Append(String Value, Int32 StartIndex, Int32 Count)
func Append(_ Value: String, _ StartIndex: Int32, _ Count: Int32) -> StringBuilder
StringBuilder Append(String Value, Int32 StartIndex, Int32 Count)
Function Append(Value As String, StartIndex As Int32, Count As Int32) As StringBuilder
Parameters:
- Value: The string to append.
- StartIndex: Strarting position of a substring.
- Count: Number of characters to append.
AppendLine mapped
Appends a string that specifies new line into the current buffer.
method AppendLine: StringBuilder
StringBuilder AppendLine()
func AppendLine() -> StringBuilder
StringBuilder AppendLine()
Function AppendLine() As StringBuilder
AppendLine (String): StringBuilder mapped
Appends a copy of the specified string and new line characters into the buffer.
method AppendLine(Value: String): StringBuilder
StringBuilder AppendLine(String Value)
func AppendLine(_ Value: String) -> StringBuilder
StringBuilder AppendLine(String Value)
Function AppendLine(Value As String) As StringBuilder
Parameters:
- Value: The string to append.
Clear mapped
Removes all characters.
method Clear
void Clear()
func Clear()
void Clear()
Sub Clear()
Delete mapped
Removes a range of characters.
method Delete(StartIndex: Int32; Count: Int32): StringBuilder
StringBuilder Delete(Int32 StartIndex, Int32 Count)
func Delete(_ StartIndex: Int32, _ Count: Int32) -> StringBuilder
StringBuilder Delete(Int32 StartIndex, Int32 Count)
Function Delete(StartIndex As Int32, Count As Int32) As StringBuilder
Parameters:
- StartIndex: Starting position of the range.
- Count: Number of characters to remove.
Insert mapped
Inserts string into a specified position.
method Insert(Offset: Int32; Value: String): StringBuilder
StringBuilder Insert(Int32 Offset, String Value)
func Insert(_ Offset: Int32, _ Value: String) -> StringBuilder
StringBuilder Insert(Int32 Offset, String Value)
Function Insert(Offset As Int32, Value As String) As StringBuilder
Parameters:
- Offset: The starting position in the buffer.
- Value: The string to insert.
Replace mapped
Replaces data withing specified range with a string.
method Replace(StartIndex: Int32; Count: Int32; Value: String): StringBuilder
StringBuilder Replace(Int32 StartIndex, Int32 Count, String Value)
func Replace(_ StartIndex: Int32, _ Count: Int32, _ Value: String) -> StringBuilder
StringBuilder Replace(Int32 StartIndex, Int32 Count, String Value)
Function Replace(StartIndex As Int32, Count As Int32, Value As String) As StringBuilder
Parameters:
- StartIndex: Starting position of the range.
- Count: Number of characters to replace.
- Value: The string to insert.
Returns a substring starting from specified position.
Parameters:
- StartIndex: Starting position of the substring.
Returns a substring with a given range.
Parameters:
- StartIndex: Starting position of the substring.
- Count: Number of characters in the substring.