Class Parser
A BBCode string parser.
Implements
Inherited Members
Namespace: SadConsole.StringParser.BBCode
Assembly: SadConsole.dll
Syntax
public class Parser : IParser
Constructors
Parser()
Creates a new instanace of the class.
Declaration
public Parser()
Properties
Tags
A collection of tags used by the parser.
Declaration
public Dictionary<string, Type> Tags { get; set; }
Property Value
Type | Description |
---|---|
Dictionary<string, Type> |
Methods
Parse(ReadOnlySpan<char>, int, ICellSurface?, ParseCommandStacks?)
Creates a colored string by parsing BBCode commands embedded in the string.
Declaration
public ColoredString Parse(ReadOnlySpan<char> value, int surfaceIndex = -1, ICellSurface? surface = null, ParseCommandStacks? initialBehaviors = null)
Parameters
Type | Name | Description |
---|---|---|
ReadOnlySpan<char> | value | The string to parse. |
int | surfaceIndex | Index of where this string will be printed. |
ICellSurface | surface | The surface the string will be printed to. |
ParseCommandStacks | initialBehaviors | Any initial defaults. |
Returns
Type | Description |
---|---|
ColoredString | The finalized string. |