TextParser GetLines Method Delta Engine Documentation

Namespace: DeltaEngine.Rendering2D.Fonts
Assembly: DeltaEngine.Rendering2D.Fonts (in DeltaEngine.Rendering2D.Fonts.dll) Version: 1.1.1.0 (1.1.1)
Syntax

public List<List<char>> GetLines(
	string text
)

Return Value

Type: List List Char  
Remarks

Tests: DeltaEngine.Rendering2D.Fonts.Tests.TextParserTests
Examples

4 unit tests call DeltaEngine.Rendering2D.Fonts.TextParser.GetLines(System.String)
[Test]
public void ParseEmptyText()
{
    var lines = parser.GetLines(GetSpaces(0));
    Assert.AreEqual(0, lines.Count);
}
[Test]
public void ParseSingleTextLine()
{
    var lines = parser.GetLines(GetSpaces(3));
    Assert.AreEqual(1, lines.Count);
    Assert.AreEqual(GetSpaces(3), new string(lines[0].ToArray()));
}
[Test]
public void ConvertTabsIntoTwoSpaces()
{
    var lines = parser.GetLines("\t \t");
    Assert.AreEqual(1, lines.Count);
    Assert.AreEqual(GetSpaces(5), new string(lines[0].ToArray()));
}
See Also