共用方式為


SequenceReader<T>.TryReadToAny 方法

定義

多載

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

嘗試讀取所有項目,最多為任何指定的 delimiters

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

嘗試讀取所有項目,最多為任何指定的 delimiters

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

來源:
SequenceReader.Search.cs
來源:
SequenceReader.Search.cs
來源:
SequenceReader.Search.cs

嘗試讀取所有項目,最多為任何指定的 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

參數

sequence
ReadOnlySequence<T>

方法傳回時,包含讀取的資料 (如有)。

delimiters
ReadOnlySpan<T>

要搜尋的分隔符號。

advancePastDelimiter
Boolean

true 表示移動超過任何指定 delimiters 中找到的第一個執行個體;否則為 false

傳回

如果找到任何 delimiters,則為 true;否則為 false

適用於

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

來源:
SequenceReader.Search.cs
來源:
SequenceReader.Search.cs
來源:
SequenceReader.Search.cs

嘗試讀取所有項目,最多為任何指定的 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

參數

span
ReadOnlySpan<T>

方法傳回時,包含讀取的資料 (如有)。

delimiters
ReadOnlySpan<T>

要搜尋的分隔符號。

advancePastDelimiter
Boolean

true 表示移動超過任何指定 delimiters 中找到的第一個執行個體;否則為 false

傳回

如果找到任何 delimiters,則為 true;否則為 false

適用於