Table of Contents

Struct SpanCodePointEnumerator

Namespace
SixLabors.Fonts.Unicode
Assembly
SixLabors.Fonts.dll

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

source ReadOnlySpan<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

CodePoint

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()

Returns

bool

true if the enumerator was successfully advanced to the next element; false if the enumerator has passed the end of the collection.