AngleSharp by AngleSharp

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

 ArrayPoolBuffer

A buffer that uses an array pool to store the characters. Usage of this buffer assumes that the max capacity is known upfront Maintains an append only contiguous chunk of characters. Created StringOrMemory instances lifetime is tied to the buffer. Works under assumption that the buffer will be disposed after use and max capacity can't be larger than char count in the source.
public int Capacity { get; }

public char this[int i] { get; }

public int Length { get; }

public ArrayPoolBuffer(int length)

A buffer that uses an array pool to store the characters. Usage of this buffer assumes that the max capacity is known upfront Maintains an append only contiguous chunk of characters. Created StringOrMemory instances lifetime is tied to the buffer. Works under assumption that the buffer will be disposed after use and max capacity can't be larger than char count in the source.

public void Append(char c)

public void Discard()

public void Dispose()

public bool HasText(ReadOnlySpan<char> test, StringComparison comparison = 4)

public bool HasTextAt(ReadOnlySpan<char> test, int offset, int length, StringComparison comparison = 4)

public IMutableCharBuffer Insert(int idx, char c)

public IMutableCharBuffer Remove(int startIndex, int length)

public void ReturnToPool()

public ReadOnlyMemory<char>? TryCopyTo(char[] buffer)