AngleSharp by AngleSharp

<PackageReference Include="AngleSharp" Version="0.17.0" />

 BaseTokenizer

public abstract class BaseTokenizer : IDisposable
Common methods and variables of all tokenizers.
protected char Current { get; }

Gets the current character.

public int InsertionPoint { get; protected set; }

Gets the current insertion point.

protected bool IsNormalized { get; }

Gets if the current index has been normalized (CRLF -> LF).

public int Position { get; }

Gets the current source index.

protected StringBuilder StringBuffer { get; }

Gets the allocated string buffer.

public BaseTokenizer(TextSource source)

Creates a new instance of the base tokenizer.

protected void Advance()

Advances in the source by 1 character if possible.

protected void Advance(int n)

Advances in the source by n characters or less if possible.

protected void Back()

Goes back in the source by 1 character if possible.

protected void Back(int n)

Goes back in the source by n characters or less if possible.

protected bool ContinuesWithInsensitive(string s)

Checks if the source continues with the given string. The comparison is case-insensitive.

protected bool ContinuesWithSensitive(string s)

Checks if the source continues with the given string. The comparison is case-sensitive.

public void Dispose()

Disposes the tokenizer by releasing the buffer.

public string FlushBuffer()

Flushes the buffer.

Gets the current text position in the source.

protected char GetNext()

Gets the next character in the source by advancing.

protected char GetPrevious()

Gets the previous character in the source by going back.

protected string PeekString(int length)

Gets the string formed by the next characters.

protected char SkipSpaces()

Skips the next space character(s).