Struct SpanCodePointEnumerator
An enumerator for retrieving CodePoint instances from a ReadOnlySpan<T>. Methods are pattern-matched by compiler to allow using foreach pattern.
Inherited Members
Namespace: SixLabors.Fonts.Unicode
Assembly: SixLabors.Fonts.dll
Syntax
public ref struct SpanCodePointEnumerator
Constructors
| Edit this page View SourceSpanCodePointEnumerator(ReadOnlySpan<char>)
Initializes a new instance of the SpanCodePointEnumerator struct.
Declaration
public SpanCodePointEnumerator(ReadOnlySpan<char> source)
Parameters
Type | Name | Description |
---|---|---|
ReadOnlySpan<char> | source | The buffer to read from. |
Properties
| Edit this page View SourceCurrent
Gets the element in the collection at the current position of the enumerator.
Declaration
public readonly CodePoint Current { get; }
Property Value
Type | Description |
---|---|
CodePoint |
Methods
| Edit this page View SourceGetEnumerator()
Returns an enumerator that iterates through the collection.
Declaration
public readonly SpanCodePointEnumerator GetEnumerator()
Returns
Type | Description |
---|---|
SpanCodePointEnumerator | An enumerator that iterates through the collection. |
MoveNext()
Advances the enumerator to the next element of the collection.
Declaration
public bool MoveNext()
Returns
Type | Description |
---|---|
bool | true if the enumerator was successfully advanced to the next element; false if the enumerator has passed the end of the collection. |