Class LineStringBuilder
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
Property Value
- char
The character at the respective position.
LineCount
Returns the line count of the string.
public int LineCount { get; }
Property Value
Methods
AddLine(string)
Adds a line to the string.
public void AddLine(string line)
Parameters
linestringThe line to add to the string.
AddLines(IEnumerable<string>)
Adds a number of lines to the builder.
public void AddLines(IEnumerable<string> lines)
Parameters
linesIEnumerable<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
linesstring[]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
linestringThe line to add to the builder.
timesintThe 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.