Table of Contents

Class InstantSB

Namespace
SunamoDevCode._public.SunamoTextOutputGenerator
Assembly
SunamoDevCode.dll

String builder that automatically separates appended items with a specified delimiter.

public class InstantSB
Inheritance
InstantSB
Derived
Inherited Members
Extension Methods

Constructors

InstantSB(string)

Initializes a new InstantSB with the specified delimiter between items.

public InstantSB(string delimiter)

Parameters

delimiter string

Delimiter string to insert between items.

Properties

Length

Gets the current length of the accumulated output.

public int Length { get; }

Property Value

int

StringBuilder

Gets or sets the underlying StringBuilder used for building output.

public StringBuilder StringBuilder { get; set; }

Property Value

StringBuilder

Methods

AddItem(string)

Adds a value followed by the delimiter, skipping if the value equals the delimiter or is empty.

public void AddItem(string value)

Parameters

value string

Value to add.

AddItems(params string[])

Adds multiple items, each followed by the delimiter.

public void AddItems(params string[] items)

Parameters

items string[]

Items to add.

AddRaw(object)

Adds the string representation of an object without any delimiter.

public void AddRaw(object content)

Parameters

content object

Object whose string representation to append.

AppendLine()

Appends a newline.

public void AppendLine()

AppendLine(string)

Appends text followed by a newline.

public void AppendLine(string text)

Parameters

text string

Text to append.

Clear()

Clears all accumulated output.

public void Clear()

EndLine(object)

Adds content without delimiter, typically used at the end of a line.

public void EndLine(object content)

Parameters

content object

Content to append.

RemoveEndDelimiter()

Removes the trailing delimiter from the accumulated output.

public void RemoveEndDelimiter()

ToString()

Returns the accumulated output as a string.

public override string ToString()

Returns

string

The built string.