共用方式為


SequenceReader<T>.TryReadTo 方法

定義

多載

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

嘗試讀取所有項目,最多為指定的 delimiter,忽略前有 delimiterEscape 的分隔符號。

TryReadTo(ReadOnlySequence<T>, T, T, Boolean)

嘗試讀取所有項目,最多為指定的 delimiter,忽略前有 delimiterEscape 的分隔符號。

TryReadTo(ReadOnlySpan<T>, T, Boolean)

嘗試讀取所有項目,最多為指定的 delimiter

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

嘗試讀取資料,直到指定為唯寫範圍的整個分隔符號符合。

TryReadTo(ReadOnlySequence<T>, T, Boolean)

嘗試讀取所有項目,最多為指定的 delimiter

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

嘗試讀取所有項目,最多為指定的 delimiter

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

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

嘗試讀取所有項目,最多為指定的 delimiter,忽略前有 delimiterEscape 的分隔符號。

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

參數

span
ReadOnlySpan<T>

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

delimiter
T

要搜尋的分隔符號。

delimiterEscape
T

值,指出要跳過的下一個 delimiter

advancePastDelimiter
Boolean

true 表示移動超過 delimiter (如果找到);否則為 false

傳回

如果找到 delimiter,則為 true;否則為 false

適用於

TryReadTo(ReadOnlySequence<T>, T, T, Boolean)

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

嘗試讀取所有項目,最多為指定的 delimiter,忽略前有 delimiterEscape 的分隔符號。

public bool TryReadTo (out System.Buffers.ReadOnlySequence<T> sequence, T delimiter, T delimiterEscape, bool advancePastDelimiter = true);
member this.TryReadTo : ReadOnlySequence * 'T * 'T * bool -> bool
Public Function TryReadTo (ByRef sequence As ReadOnlySequence(Of T), delimiter As T, delimiterEscape As T, Optional advancePastDelimiter As Boolean = true) As Boolean

參數

sequence
ReadOnlySequence<T>

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

delimiter
T

要搜尋的分隔符號。

delimiterEscape
T

值,指出要跳過的下一個 delimiter

advancePastDelimiter
Boolean

true 表示移動超過 delimiter (如果找到);否則為 false

傳回

如果找到 delimiter,則為 true;否則為 false

適用於

TryReadTo(ReadOnlySpan<T>, T, Boolean)

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

嘗試讀取所有項目,最多為指定的 delimiter

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

參數

span
ReadOnlySpan<T>

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

delimiter
T

要搜尋的分隔符號。

advancePastDelimiter
Boolean

true 表示移動超過 delimiter (如果找到);否則為 false

傳回

如果找到 delimiter,則為 true;否則為 false

適用於

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

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

嘗試讀取資料,直到指定為唯寫範圍的整個分隔符號符合。

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

參數

sequence
ReadOnlySequence<T>

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

delimiter
ReadOnlySpan<T>

包含一或多個分隔符號的唯讀範圍。

advancePastDelimiter
Boolean

true 表示移動超過 delimiter (如果找到);否則為 false

傳回

如果找到 delimiter,則為 true;否則為 false

適用於

TryReadTo(ReadOnlySequence<T>, T, Boolean)

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

嘗試讀取所有項目,最多為指定的 delimiter

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

參數

sequence
ReadOnlySequence<T>

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

delimiter
T

要搜尋的分隔符號。

advancePastDelimiter
Boolean

true 表示移動超過 delimiter (如果找到);否則為 false

傳回

如果找到 delimiter,則為 true;否則為 false

適用於

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

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

嘗試讀取所有項目,最多為指定的 delimiter

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

參數

span
ReadOnlySpan<T>

讀取資料 (如果有的話)。

delimiter
ReadOnlySpan<T>

要搜尋的分隔符號。

advancePastDelimiter
Boolean

true 則前進超過 delimiter (如果找到)。

傳回

如果找到 delimiter,則為 true;否則為 false

適用於