<PackageReference Include="System.Drawing.Common" Version="10.0.0-preview.6.25358.103" />

SpanReader<T>

Fast stack based ReadOnlySpan<T> reader.
public int Position { get; set; }

public ReadOnlySpan<T> Span { get; }

public SpanReader(ReadOnlySpan<T> span)

Fast stack based ReadOnlySpan<T> reader.

public void Advance(int count)

Advance the reader by the given count.

public int AdvancePast(T value)

Advance the reader past consecutive instances of the given value.

public bool IsNext(ReadOnlySpan<T> next)

Check to see if the given next values are next.

public void Reset()

Reset the reader to the beginning of the span.

public void Rewind(int count)

Rewind the reader by the given count.

public bool TryAdvancePast(ReadOnlySpan<T> next)

Advance the reader if the given next values are next.

public bool TryRead(out T value)

Try to read the next value.

public bool TryRead(int count, out ReadOnlySpan span)

Try to read a span of the given count.

public bool TryRead<TValue>(out TValue value) where TValue : ValueType modreq(System.Runtime.InteropServices.UnmanagedType)

Try to read a value of the given type. The size of the value must be evenly divisible by the size of T.

public bool TryRead<TValue>(int count, out ReadOnlySpan value) where TValue : ValueType modreq(System.Runtime.InteropServices.UnmanagedType)

Try to read a span of values of the given type. The size of the value must be evenly divisible by the size of T.

public bool TryReadTo(T delimiter, out ReadOnlySpan span)

Try to read everything up to the given delimiter. Advances the reader past the delimiter if found.

public bool TryReadTo(T delimiter, bool advancePastDelimiter, out ReadOnlySpan span)

Try to read everything up to the given delimiter.