Table of Contents

Class LineStringBuilder

Namespace
Garyon.Objects
Assembly
Garyon.dll

Provides mechanisms and functions to building a multiline string.

public class LineStringBuilder
Inheritance
LineStringBuilder
Inherited Members
Extension Methods

Remarks

Added strings are not checked for whether they're multiline or not, and are treated as a single line.

Properties

this[int, int]

Gets or sets the character at the specified line and column.

public char this[int line, int column] { get; set; }

Parameters

line int

The index of the line.

column int

The index of the column.

Property Value

char

The character at the respective position.

LineCount

Returns the line count of the string.

public int LineCount { get; }

Property Value

int

Methods

AddLine(string)

Adds a line to the string.

public void AddLine(string line)

Parameters

line string

The line to add to the string.

AddLines(IEnumerable<string>)

Adds a number of lines to the builder.

public void AddLines(IEnumerable<string> lines)

Parameters

lines IEnumerable<string>

The lines to add to the builder.

AddLines(params string[])

Adds a number of lines to the builder.

public void AddLines(params string[] lines)

Parameters

lines string[]

The lines to add to the builder.

AddRepeatedLine(string, int)

Adds the same line to the builder a specified number of times.

public void AddRepeatedLine(string line, int times)

Parameters

line string

The line to add to the builder.

times int

The numer of times to add the line to the builder.

Clear()

Clears all the lines.

public void Clear()

ToString()

Builds the resulting string by concatenating all the lines and delimiting them with newline characters.

public override string ToString()

Returns

string

The resulting string.