Struct SpanGraphemeEnumerator
An enumerator for retrieving Grapheme instances from a ReadOnlySpan<T>.
Implements the Unicode Grapheme Cluster Algorithm. UAX:29
https://www.unicode.org/reports/tr29/tr29-37.html
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 SpanGraphemeEnumeratorConstructors
| Improve this Doc View SourceSpanGraphemeEnumerator(ReadOnlySpan<Char>)
Initializes a new instance of the SpanGraphemeEnumerator struct.
Declaration
public SpanGraphemeEnumerator(ReadOnlySpan<char> source)Parameters
| Type | Name | Description | 
|---|---|---|
| ReadOnlySpan<Char> | source | The buffer to read from. | 
Properties
| Improve this Doc View SourceCurrent
Gets the element in the collection at the current position of the enumerator.
Declaration
public ReadOnlySpan<char> Current { readonly get; }Property Value
| Type | Description | 
|---|---|
| ReadOnlySpan<Char> | 
Methods
| Improve this Doc View SourceGetEnumerator()
Returns an enumerator that iterates through the collection.
Declaration
public SpanGraphemeEnumerator GetEnumerator()Returns
| Type | Description | 
|---|---|
| SpanGraphemeEnumerator | 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 | 
|---|---|
| Boolean | true if the enumerator was successfully advanced to the next element; false if the enumerator has passed the end of the collection. |