SequenceReader<T>.TryReadToAny Method

Definition

Overloads

TryReadToAny(ReadOnlySequence<T>, ReadOnlySpan<T>, Boolean)

Tries to read everything up to any of the specified delimiters.

TryReadToAny(ReadOnlySpan<T>, ReadOnlySpan<T>, Boolean)

Tries to read everything up to any of the specified delimiters.

TryReadToAny(ReadOnlySequence<T>, ReadOnlySpan<T>, Boolean)

Tries to read everything up to any of the specified delimiters.

public bool TryReadToAny (out System.Buffers.ReadOnlySequence<T> sequence, ReadOnlySpan<T> delimiters, bool advancePastDelimiter = true);
member this.TryReadToAny : ReadOnlySequence * ReadOnlySpan<'T (requires 'T : struct)> * bool -> bool
Public Function TryReadToAny (ByRef sequence As ReadOnlySequence(Of T), delimiters As ReadOnlySpan(Of T), Optional advancePastDelimiter As Boolean = true) As Boolean

Parameters

sequence
ReadOnlySequence<T>

When the method returns, contains the data read, if any.

delimiters
ReadOnlySpan<T>

The delimiters to look for.

advancePastDelimiter
Boolean

true to move past the first found instance of any of the given delimiters; otherwise, false.

Returns

Boolean

true if any of the delimiters were found; otherwise, false.

Applies to

TryReadToAny(ReadOnlySpan<T>, ReadOnlySpan<T>, Boolean)

Tries to read everything up to any of the specified delimiters.

public bool TryReadToAny (out ReadOnlySpan<T> span, ReadOnlySpan<T> delimiters, bool advancePastDelimiter = true);
member this.TryReadToAny : ReadOnlySpan * ReadOnlySpan<'T (requires 'T : struct)> * bool -> bool
Public Function TryReadToAny (ByRef span As ReadOnlySpan(Of T), delimiters As ReadOnlySpan(Of T), Optional advancePastDelimiter As Boolean = true) As Boolean

Parameters

span
ReadOnlySpan<T>

When the method returns, contains the data read, if any.

delimiters
ReadOnlySpan<T>

The delimiters to look for.

advancePastDelimiter
Boolean

true to move past the first found instance of any of the given delimiters; otherwise, false.

Returns

Boolean

true if any of the delimiters were found; otherwise, false.

Applies to