Επεξεργασία

Κοινή χρήση μέσω


SequenceReader<T>.TryReadTo Method

Definition

Overloads

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

Tries to read everything up to the given delimiter, ignoring delimiters that are preceded by delimiterEscape.

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

Tries to read everything up to the given delimiter, ignoring delimiters that are preceded by delimiterEscape.

TryReadTo(ReadOnlySpan<T>, T, Boolean)

Tries to read everything up to the given delimiter.

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

Tries to read data until the entire delimiter specified as a read-only span matches.

TryReadTo(ReadOnlySequence<T>, T, Boolean)

Tries to read everything up to the given delimiter.

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

Try to read everything up to the given delimiter.

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

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

Tries to read everything up to the given delimiter, ignoring delimiters that are preceded by 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

Parameters

span
ReadOnlySpan<T>

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

delimiter
T

The delimiter to look for.

delimiterEscape
T

A value that indicates that an immediately following delimiter is to be skipped.

advancePastDelimiter
Boolean

true to move past the delimiter if found; otherwise, false.

Returns

true if the delimiter was found; otherwise, false.

Applies to

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

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

Tries to read everything up to the given delimiter, ignoring delimiters that are preceded by 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

Parameters

sequence
ReadOnlySequence<T>

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

delimiter
T

The delimiter to look for.

delimiterEscape
T

A value that indicates that an immediately following delimiter is to be skipped.

advancePastDelimiter
Boolean

true to move past the delimiter if found; otherwise, false.

Returns

true if the delimiter was found; otherwise, false.

Applies to

TryReadTo(ReadOnlySpan<T>, T, Boolean)

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

Tries to read everything up to the given 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

Parameters

span
ReadOnlySpan<T>

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

delimiter
T

The delimiter to look for.

advancePastDelimiter
Boolean

true to move past the delimiter if found; otherwise, false.

Returns

true if the delimiter was found; otherwise, false.

Applies to

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

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

Tries to read data until the entire delimiter specified as a read-only span matches.

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

Parameters

sequence
ReadOnlySequence<T>

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

delimiter
ReadOnlySpan<T>

A read-only span that contains one or more delimiters.

advancePastDelimiter
Boolean

true to move past the delimiter if found; otherwise, false.

Returns

true if the delimiter was found; otherwise, false.

Applies to

TryReadTo(ReadOnlySequence<T>, T, Boolean)

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

Tries to read everything up to the given 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

Parameters

sequence
ReadOnlySequence<T>

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

delimiter
T

The delimiter to look for.

advancePastDelimiter
Boolean

true to move past the delimiter if found; otherwise, false.

Returns

true if the delimiter was found; otherwise, false.

Applies to

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

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

Try to read everything up to the given 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

Parameters

span
ReadOnlySpan<T>

The read data, if any.

delimiter
ReadOnlySpan<T>

The delimiter to look for.

advancePastDelimiter
Boolean

true to move past the delimiter if found.

Returns

true if the delimiter was found; otherwise, false.

Applies to