SequenceReader<T>.TryAdvanceToAny 方法

定义

搜索大量指定分隔符中的任意分隔符,并向前越过找到的第一个分隔符(可选)。

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

参数

delimiters
ReadOnlySpan<T>

要搜索的分隔符。

advancePastDelimiter
Boolean

若要跳过具有任意给定 delimiters 的第一个实例,则为 true;若不跳过分隔符,则为 false

返回

如果发现了任意给定 delimiters,则为 true;否则为 false

适用于