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.

 

property Chars[Index: Int32]: Char read write;

 

Char Chars[Int32 Index] { get; set; }

 

subscript Chars(_ Index: Int32) -> Char { get{} set{} }

 

Char Chars[Int32 Index] { __get; __set; }

 

Property Chars(Index As Int32) As Char

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.

Substring (Int32): String  mapped

Returns a substring starting from specified position.

 

method Substring(StartIndex: Int32): String

 

String Substring(Int32 StartIndex)

 

func Substring(_ StartIndex: Int32) -> String

 

String Substring(Int32 StartIndex)

 

Function Substring(StartIndex As Int32) As String

Parameters:

  • StartIndex: Starting position of the substring.

Substring (Int32, Int32): String  mapped

Returns a substring with a given range.

 

method Substring(StartIndex: Int32; Count: Int32): String

 

String Substring(Int32 StartIndex, Int32 Count)

 

func Substring(_ StartIndex: Int32, _ Count: Int32) -> String

 

String Substring(Int32 StartIndex, Int32 Count)

 

Function Substring(StartIndex As Int32, Count As Int32) As String

Parameters:

  • StartIndex: Starting position of the substring.
  • Count: Number of characters in the substring.

 

Chars

Gets or sets the character at the specified position.

 

property Chars[Index: Int32]: Char read write;

 

Char Chars[Int32 Index] { get; set; }

 

subscript Chars(_ Index: Int32) -> Char { get{} set{} }

 

Char Chars[Int32 Index] { __get; __set; }

 

Property Chars(Index As Int32) As Char

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

 

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.

Substring (Int32): String  mapped

Returns a substring starting from specified position.

 

method Substring(StartIndex: Int32): String

 

String Substring(Int32 StartIndex)

 

func Substring(_ StartIndex: Int32) -> String

 

String Substring(Int32 StartIndex)

 

Function Substring(StartIndex As Int32) As String

Parameters:

  • StartIndex: Starting position of the substring.

Substring (Int32, Int32): String  mapped

Returns a substring with a given range.

 

method Substring(StartIndex: Int32; Count: Int32): String

 

String Substring(Int32 StartIndex, Int32 Count)

 

func Substring(_ StartIndex: Int32, _ Count: Int32) -> String

 

String Substring(Int32 StartIndex, Int32 Count)

 

Function Substring(StartIndex As Int32, Count As Int32) As String

Parameters:

  • StartIndex: Starting position of the substring.
  • Count: Number of characters in the substring.