Struct SpanCodePointEnumerator
An enumerator for retrieving CodePoint instances from a ReadOnlySpan<T>. Methods are pattern-matched by compiler to allow using foreach pattern.
public ref struct SpanCodePointEnumerator
- Inherited Members
Constructors
SpanCodePointEnumerator(ReadOnlySpan<char>)
Initializes a new instance of the SpanCodePointEnumerator struct.
public SpanCodePointEnumerator(ReadOnlySpan<char> source)
Parameters
sourceReadOnlySpan<char>The buffer to read from.
Properties
Current
Gets the element in the collection at the current position of the enumerator.
public readonly CodePoint Current { get; }
Property Value
Methods
GetEnumerator()
Returns an enumerator that iterates through the collection.
public readonly SpanCodePointEnumerator GetEnumerator()
Returns
- SpanCodePointEnumerator
An enumerator that iterates through the collection.
MoveNext()
Advances the enumerator to the next element of the collection.
public bool MoveNext()