แก้ไข

แชร์ผ่าน


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)

Source:
SequenceReader.Search.cs
Source:
SequenceReader.Search.cs
Source:
SequenceReader.Search.cs

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);
public bool TryReadToAny (out System.Buffers.ReadOnlySequence<T> sequence, scoped 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

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

Applies to

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

Source:
SequenceReader.Search.cs
Source:
SequenceReader.Search.cs
Source:
SequenceReader.Search.cs

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

public bool TryReadToAny (out ReadOnlySpan<T> span, ReadOnlySpan<T> delimiters, bool advancePastDelimiter = true);
public bool TryReadToAny (out ReadOnlySpan<T> span, scoped 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

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

Applies to