<PackageReference Include="System.Memory" Version="4.6.3" />

BuffersExtensions

public static class BuffersExtensions
Extension methods for ReadOnlySequence<T>
public static void CopyTo<T>(this ref ReadOnlySequence source, Span<T> destination)

Copy the ReadOnlySequence<T> to the specified Span<T>.

public static SequencePosition? PositionOf<T>(this ref ReadOnlySequence source, T value) where T : IEquatable<T>

Returns position of first occurrence of item in the ReadOnlySequence<T>

public static T[] ToArray<T>(this ref ReadOnlySequence sequence)

Converts the ReadOnlySequence<T> to an array

public static void Write<T>(this IBufferWriter<T> writer, ReadOnlySpan<T> value)

Writes contents of value to writer