StringBuilder

Overview

String builder is a class create strings built out of lots of small parts.

Location

 

constructor    (declared in Object)

Default constructor.

 

constructor

 

StringBuilder()

 

init()

 

StringBuilder()

 

Sub New()

constructor (Int32)

Creates a string builder with a given capacity.

 

constructor(aCapacity: Int32)

 

StringBuilder(Int32 aCapacity)

 

init(_ aCapacity: Int32)

 

StringBuilder(Int32 aCapacity)

 

Sub New(aCapacity As Int32)

Parameters:

  • aCapacity:

constructor (String)

Creates a string builder with original data in it.

 

constructor(Data: String)

 

StringBuilder(String Data)

 

init(_ Data: String)

 

StringBuilder(String Data)

 

Sub New(Data As String)

Parameters:

  • Data:

Append (Char): StringBuilder

Add to the end of this string builder.

 

method Append(Value: Char): StringBuilder

 

StringBuilder Append(Char Value)

 

func Append(_ Value: Char) -> StringBuilder

 

StringBuilder Append(Char Value)

 

Function Append(Value As Char) As StringBuilder

Parameters:

  • Value:

Append (Char, Int32): StringBuilder

Add to the end of this string builder.

 

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:
  • RepeatCount:

Append (Object): StringBuilder Android, iOS, iOS Simulator, macOS, tvOS, tvOS Simulator, Ubuntu, UIKit for Mac, watchOS Simulator, watchOS-arm64_32, watchOS-armv7k, WebAssembly, Windows

Add to the end of this string builder.

 

method Append(o: Object): StringBuilder

 

StringBuilder Append(Object o)

 

func Append(_ o: Object) -> StringBuilder

 

StringBuilder Append(Object o)

 

Function Append(o As Object) As StringBuilder

Parameters:

  • o:

Append (String): StringBuilder

Add to the end of this string builder.

 

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:

Add to the end of this string builder.

 

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:
  • StartIndex:
  • Count:

AppendLine

Add to the end of this string builder and add a new line.

 

method AppendLine: StringBuilder

 

StringBuilder AppendLine()

 

func AppendLine() -> StringBuilder

 

StringBuilder AppendLine()

 

Function AppendLine() As StringBuilder

AppendLine (String): StringBuilder

Add to the end of this string builder and add a new line.

 

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:

Capacity

Gets/sets the capacity of this stringbuilder.

 

property Capacity: Int32 read write;

 

Int32 Capacity { get; set; }

 

var Capacity: Int32 { get{} set{} }

 

Int32 Capacity { __get; __set; }

 

Property Capacity() As Int32

Chars

read/write accessor for the characters in this string.

 

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

Clear this stringbuilder.

 

method Clear

 

void Clear()

 

func Clear()

 

void Clear()

 

Sub Clear()

EnsureCapacity

ensures this string has at least aCapacity capacity.

 

method EnsureCapacity(aCapacity: Int32): Int32

 

Int32 EnsureCapacity(Int32 aCapacity)

 

func EnsureCapacity(_ aCapacity: Int32) -> Int32

 

Int32 EnsureCapacity(Int32 aCapacity)

 

Function EnsureCapacity(aCapacity As Int32) As Int32

Parameters:

  • aCapacity:

Equals (Object): Boolean  override virtual

Returns true if the target object matches this one, by default compares the reference.

 

method Equals(obj: Object): Boolean

 

Boolean Equals(Object obj)

 

func Equals(_ obj: Object) -> Boolean

 

Boolean Equals(Object obj)

 

Function Equals(obj As Object) As Boolean

Parameters:

  • obj: the reference to compare this with.

Returns true if the target object matches this one, by default compares the reference.

 

method Equals(sb: StringBuilder): Boolean

 

Boolean Equals(StringBuilder sb)

 

func Equals(_ sb: StringBuilder) -> Boolean

 

Boolean Equals(StringBuilder sb)

 

Function Equals(sb As StringBuilder) As Boolean

Parameters:

  • sb:

Finalize  protected virtual    (declared in Object)

Finalizer implementation. If not overriden it's not called at all, the runtime checks if there is an override before calling a finalizer.

 

method Finalize

 

void Finalize()

 

func Finalize()

 

void Finalize()

 

Sub Finalize()

GetHashCode  virtual    (declared in Object)

Returns a hashcode for this object. Overriden implementations should make sure that the number returned here is constant given the same object.

 

method GetHashCode: Int32

 

Int32 GetHashCode()

 

func GetHashCode() -> Int32

 

Int32 GetHashCode()

 

Function GetHashCode() As Int32

GetType    (declared in Object)

Returns the actual type of this class

 

method GetType: Type

 

Type GetType()

 

func GetType() -> Type

 

Type GetType()

 

Function GetType() As Type

Insert

Insert into the string builder.

 

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:
  • Value:

Length

Returns the length of this string builder.

 

property Length: Int32 read write;

 

Int32 Length { get; set; }

 

var Length: Int32 { get{} set{} }

 

Int32 Length { __get; __set; }

 

Property Length() As Int32

MaxCapacity

Returns the max capacity.

 

const MaxCapacity: Int32 = 2147483647;

 

const Int32 MaxCapacity = 2147483647

 

static let MaxCapacity: Int32 = 2147483647

 

static final Int32 MaxCapacity = 2147483647

 

Dim MaxCapacity As Int32 = 2147483647

ReferenceEquals    (declared in Object)

Compares two references for equivalence (even if they have an equals operator)

 

class method ReferenceEquals(a: Object; b: Object): Boolean

 

static Boolean ReferenceEquals(Object a, Object b)

 

static func ReferenceEquals(_ a: Object, _ b: Object) -> Boolean

 

static Boolean ReferenceEquals(Object a, Object b)

 

Shared Function ReferenceEquals(a As Object, b As Object) As Boolean

Parameters:

  • a: left value
  • b: right value

Remove

Remove from this stringbuilder.

 

method Remove(StartIndex: Int32; Count: Int32): StringBuilder

 

StringBuilder Remove(Int32 StartIndex, Int32 Count)

 

func Remove(_ StartIndex: Int32, _ Count: Int32) -> StringBuilder

 

StringBuilder Remove(Int32 StartIndex, Int32 Count)

 

Function Remove(StartIndex As Int32, Count As Int32) As StringBuilder

Parameters:

  • StartIndex:
  • Count:

Replace (Char, Char): StringBuilder

Replace characters in this stringbuilder.

 

method Replace(OldChar: Char; NewChar: Char): StringBuilder

 

StringBuilder Replace(Char OldChar, Char NewChar)

 

func Replace(_ OldChar: Char, _ NewChar: Char) -> StringBuilder

 

StringBuilder Replace(Char OldChar, Char NewChar)

 

Function Replace(OldChar As Char, NewChar As Char) As StringBuilder

Parameters:

  • OldChar:
  • NewChar:

Replace characters in this stringbuilder.

 

method Replace(OldChar: Char; NewChar: Char; StartIndex: Int32; Count: Int32): StringBuilder

 

StringBuilder Replace(Char OldChar, Char NewChar, Int32 StartIndex, Int32 Count)

 

func Replace(_ OldChar: Char, _ NewChar: Char, _ StartIndex: Int32, _ Count: Int32) -> StringBuilder

 

StringBuilder Replace(Char OldChar, Char NewChar, Int32 StartIndex, Int32 Count)

 

Function Replace(OldChar As Char, NewChar As Char, StartIndex As Int32, Count As Int32) As StringBuilder

Parameters:

  • OldChar:
  • NewChar:
  • StartIndex:
  • Count:

Replace characters in this stringbuilder.

 

method Replace(OldValue: String; NewValue: String): StringBuilder

 

StringBuilder Replace(String OldValue, String NewValue)

 

func Replace(_ OldValue: String, _ NewValue: String) -> StringBuilder

 

StringBuilder Replace(String OldValue, String NewValue)

 

Function Replace(OldValue As String, NewValue As String) As StringBuilder

Parameters:

  • OldValue:
  • NewValue:

Replace characters in this stringbuilder.

 

method Replace(OldValue: String; NewValue: String; StartIndex: Int32; Count: Int32): StringBuilder

 

StringBuilder Replace(String OldValue, String NewValue, Int32 StartIndex, Int32 Count)

 

func Replace(_ OldValue: String, _ NewValue: String, _ StartIndex: Int32, _ Count: Int32) -> StringBuilder

 

StringBuilder Replace(String OldValue, String NewValue, Int32 StartIndex, Int32 Count)

 

Function Replace(OldValue As String, NewValue As String, StartIndex As Int32, Count As Int32) As StringBuilder

Parameters:

  • OldValue:
  • NewValue:
  • StartIndex:
  • Count:

ToString  override virtual

Gets the string representation of this method.

 

method ToString: String

 

String ToString()

 

func ToString() -> String

 

String ToString()

 

Function ToString() As String

ToString (Int32, Int32): String

Gets the string representation of this stringbuilder.

 

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

 

String ToString(Int32 StartIndex, Int32 Count)

 

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

 

String ToString(Int32 StartIndex, Int32 Count)

 

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

Parameters:

  • StartIndex:
  • Count:

 

MaxCapacity

Returns the max capacity.

 

const MaxCapacity: Int32 = 2147483647;

 

const Int32 MaxCapacity = 2147483647

 

static let MaxCapacity: Int32 = 2147483647

 

static final Int32 MaxCapacity = 2147483647

 

Dim MaxCapacity As Int32 = 2147483647

 

Capacity

Gets/sets the capacity of this stringbuilder.

 

property Capacity: Int32 read write;

 

Int32 Capacity { get; set; }

 

var Capacity: Int32 { get{} set{} }

 

Int32 Capacity { __get; __set; }

 

Property Capacity() As Int32

Chars

read/write accessor for the characters in this string.

 

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

Returns the length of this string builder.

 

property Length: Int32 read write;

 

Int32 Length { get; set; }

 

var Length: Int32 { get{} set{} }

 

Int32 Length { __get; __set; }

 

Property Length() As Int32

 

ReferenceEquals    (declared in Object)

Compares two references for equivalence (even if they have an equals operator)

 

class method ReferenceEquals(a: Object; b: Object): Boolean

 

static Boolean ReferenceEquals(Object a, Object b)

 

static func ReferenceEquals(_ a: Object, _ b: Object) -> Boolean

 

static Boolean ReferenceEquals(Object a, Object b)

 

Shared Function ReferenceEquals(a As Object, b As Object) As Boolean

Parameters:

  • a: left value
  • b: right value

 

constructor    (declared in Object)

Default constructor.

 

constructor

 

StringBuilder()

 

init()

 

StringBuilder()

 

Sub New()

constructor (Int32)

Creates a string builder with a given capacity.

 

constructor(aCapacity: Int32)

 

StringBuilder(Int32 aCapacity)

 

init(_ aCapacity: Int32)

 

StringBuilder(Int32 aCapacity)

 

Sub New(aCapacity As Int32)

Parameters:

  • aCapacity:

constructor (String)

Creates a string builder with original data in it.

 

constructor(Data: String)

 

StringBuilder(String Data)

 

init(_ Data: String)

 

StringBuilder(String Data)

 

Sub New(Data As String)

Parameters:

  • Data:

Append (Char): StringBuilder

Add to the end of this string builder.

 

method Append(Value: Char): StringBuilder

 

StringBuilder Append(Char Value)

 

func Append(_ Value: Char) -> StringBuilder

 

StringBuilder Append(Char Value)

 

Function Append(Value As Char) As StringBuilder

Parameters:

  • Value:

Append (Char, Int32): StringBuilder

Add to the end of this string builder.

 

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:
  • RepeatCount:

Append (Object): StringBuilder Android, iOS, iOS Simulator, macOS, tvOS, tvOS Simulator, Ubuntu, UIKit for Mac, watchOS Simulator, watchOS-arm64_32, watchOS-armv7k, WebAssembly, Windows

Add to the end of this string builder.

 

method Append(o: Object): StringBuilder

 

StringBuilder Append(Object o)

 

func Append(_ o: Object) -> StringBuilder

 

StringBuilder Append(Object o)

 

Function Append(o As Object) As StringBuilder

Parameters:

  • o:

Append (String): StringBuilder

Add to the end of this string builder.

 

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:

Add to the end of this string builder.

 

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:
  • StartIndex:
  • Count:

AppendLine

Add to the end of this string builder and add a new line.

 

method AppendLine: StringBuilder

 

StringBuilder AppendLine()

 

func AppendLine() -> StringBuilder

 

StringBuilder AppendLine()

 

Function AppendLine() As StringBuilder

AppendLine (String): StringBuilder

Add to the end of this string builder and add a new line.

 

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:

Clear

Clear this stringbuilder.

 

method Clear

 

void Clear()

 

func Clear()

 

void Clear()

 

Sub Clear()

EnsureCapacity

ensures this string has at least aCapacity capacity.

 

method EnsureCapacity(aCapacity: Int32): Int32

 

Int32 EnsureCapacity(Int32 aCapacity)

 

func EnsureCapacity(_ aCapacity: Int32) -> Int32

 

Int32 EnsureCapacity(Int32 aCapacity)

 

Function EnsureCapacity(aCapacity As Int32) As Int32

Parameters:

  • aCapacity:

Equals (Object): Boolean  override virtual

Returns true if the target object matches this one, by default compares the reference.

 

method Equals(obj: Object): Boolean

 

Boolean Equals(Object obj)

 

func Equals(_ obj: Object) -> Boolean

 

Boolean Equals(Object obj)

 

Function Equals(obj As Object) As Boolean

Parameters:

  • obj: the reference to compare this with.

Returns true if the target object matches this one, by default compares the reference.

 

method Equals(sb: StringBuilder): Boolean

 

Boolean Equals(StringBuilder sb)

 

func Equals(_ sb: StringBuilder) -> Boolean

 

Boolean Equals(StringBuilder sb)

 

Function Equals(sb As StringBuilder) As Boolean

Parameters:

  • sb:

Finalize  protected virtual    (declared in Object)

Finalizer implementation. If not overriden it's not called at all, the runtime checks if there is an override before calling a finalizer.

 

method Finalize

 

void Finalize()

 

func Finalize()

 

void Finalize()

 

Sub Finalize()

GetHashCode  virtual    (declared in Object)

Returns a hashcode for this object. Overriden implementations should make sure that the number returned here is constant given the same object.

 

method GetHashCode: Int32

 

Int32 GetHashCode()

 

func GetHashCode() -> Int32

 

Int32 GetHashCode()

 

Function GetHashCode() As Int32

GetType    (declared in Object)

Returns the actual type of this class

 

method GetType: Type

 

Type GetType()

 

func GetType() -> Type

 

Type GetType()

 

Function GetType() As Type

Insert

Insert into the string builder.

 

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:
  • Value:

Remove

Remove from this stringbuilder.

 

method Remove(StartIndex: Int32; Count: Int32): StringBuilder

 

StringBuilder Remove(Int32 StartIndex, Int32 Count)

 

func Remove(_ StartIndex: Int32, _ Count: Int32) -> StringBuilder

 

StringBuilder Remove(Int32 StartIndex, Int32 Count)

 

Function Remove(StartIndex As Int32, Count As Int32) As StringBuilder

Parameters:

  • StartIndex:
  • Count:

Replace (Char, Char): StringBuilder

Replace characters in this stringbuilder.

 

method Replace(OldChar: Char; NewChar: Char): StringBuilder

 

StringBuilder Replace(Char OldChar, Char NewChar)

 

func Replace(_ OldChar: Char, _ NewChar: Char) -> StringBuilder

 

StringBuilder Replace(Char OldChar, Char NewChar)

 

Function Replace(OldChar As Char, NewChar As Char) As StringBuilder

Parameters:

  • OldChar:
  • NewChar:

Replace characters in this stringbuilder.

 

method Replace(OldChar: Char; NewChar: Char; StartIndex: Int32; Count: Int32): StringBuilder

 

StringBuilder Replace(Char OldChar, Char NewChar, Int32 StartIndex, Int32 Count)

 

func Replace(_ OldChar: Char, _ NewChar: Char, _ StartIndex: Int32, _ Count: Int32) -> StringBuilder

 

StringBuilder Replace(Char OldChar, Char NewChar, Int32 StartIndex, Int32 Count)

 

Function Replace(OldChar As Char, NewChar As Char, StartIndex As Int32, Count As Int32) As StringBuilder

Parameters:

  • OldChar:
  • NewChar:
  • StartIndex:
  • Count:

Replace characters in this stringbuilder.

 

method Replace(OldValue: String; NewValue: String): StringBuilder

 

StringBuilder Replace(String OldValue, String NewValue)

 

func Replace(_ OldValue: String, _ NewValue: String) -> StringBuilder

 

StringBuilder Replace(String OldValue, String NewValue)

 

Function Replace(OldValue As String, NewValue As String) As StringBuilder

Parameters:

  • OldValue:
  • NewValue:

Replace characters in this stringbuilder.

 

method Replace(OldValue: String; NewValue: String; StartIndex: Int32; Count: Int32): StringBuilder

 

StringBuilder Replace(String OldValue, String NewValue, Int32 StartIndex, Int32 Count)

 

func Replace(_ OldValue: String, _ NewValue: String, _ StartIndex: Int32, _ Count: Int32) -> StringBuilder

 

StringBuilder Replace(String OldValue, String NewValue, Int32 StartIndex, Int32 Count)

 

Function Replace(OldValue As String, NewValue As String, StartIndex As Int32, Count As Int32) As StringBuilder

Parameters:

  • OldValue:
  • NewValue:
  • StartIndex:
  • Count:

ToString  override virtual

Gets the string representation of this method.

 

method ToString: String

 

String ToString()

 

func ToString() -> String

 

String ToString()

 

Function ToString() As String

ToString (Int32, Int32): String

Gets the string representation of this stringbuilder.

 

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

 

String ToString(Int32 StartIndex, Int32 Count)

 

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

 

String ToString(Int32 StartIndex, Int32 Count)

 

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

Parameters:

  • StartIndex:
  • Count: