Struct SpanSplitEnumerator<T>
Enumerates the elements of a
Namespace: X10D.Collections
Assembly: X10D.dll
Syntax
public struct SpanSplitEnumerator<T>
where T : struct, IEquatable<T>
Type Parameters
Name | Description |
---|---|
T | The type of elements in the span. |
Constructors
| Improve this Doc View SourceSpanSplitEnumerator(ReadOnlySpan<T>, T)
Initializes a new instance of the SpanSplitEnumerator<T> struct.
Declaration
public SpanSplitEnumerator(ReadOnlySpan<T> source, T delimiter)
Parameters
Type | Name | Description |
---|---|---|
ReadOnlySpan<T> | source | The source span. |
T | delimiter | The delimiting element. |
SpanSplitEnumerator(ReadOnlySpan<T>, ReadOnlySpan<T>)
Initializes a new instance of the SpanSplitEnumerator<T> struct.
Declaration
public SpanSplitEnumerator(ReadOnlySpan<T> source, ReadOnlySpan<T> delimiter)
Parameters
Type | Name | Description |
---|---|---|
ReadOnlySpan<T> | source | The source span. |
ReadOnlySpan<T> | delimiter | The delimiting span of elements. |
Properties
| Improve this Doc View SourceCurrent
Gets the element at the current position of the enumerator.
Declaration
public ReadOnlySpan<T> Current { get; }
Property Value
Type | Description |
---|---|
ReadOnlySpan<T> | The element in the |
Methods
| Improve this Doc View SourceGetEnumerator()
Returns the current enumerator.
Declaration
public SpanSplitEnumerator<T> GetEnumerator()
Returns
Type | Description |
---|---|
SpanSplitEnumerator<T> | The current instance of SpanSplitEnumerator<T>. |
Remarks
This method exists to provide the ability to enumerate within a foreach
loop. It should not be called
manually.
MoveNext()
Advances the enumerator to the next element of the
Declaration
public bool MoveNext()
Returns
Type | Description |
---|---|
System.Boolean | true if the enumerator was successfully advanced to the next element; false if the enumerator has passed the end of the span. |