Namespace: DeltaEngine.Rendering2D.Fonts
Assembly: DeltaEngine.Rendering2D.Fonts (in DeltaEngine.Rendering2D.Fonts.dll) Version: 1.1.1.0 (1.1.1)
Tests: DeltaEngine.Rendering2D.Fonts.Tests.TextParserTests
4 unit tests call DeltaEngine.Rendering2D.Fonts.TextParser.GetLines(System.String)
Assembly: DeltaEngine.Rendering2D.Fonts (in DeltaEngine.Rendering2D.Fonts.dll) Version: 1.1.1.0 (1.1.1)
Syntax
Parameters
- text
- Type: System String
Return Value
Type: List List CharRemarks
Examples
[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