← Standard library

GraphemeIterator

scoped struct GraphemeIterator
import GraphemeIterator from Wax;

A scoped iterator over UTF-8 extended grapheme clusters. It borrows its byte storage; use HasNext before MoveNext, or consume it through iteration syntax.

String.wax:1671

Members

constructorconstructor

public constructor (ReadOnlySpan<uint8> bytes)

Creates an iterator over the supplied byte view without copying. Character and grapheme iteration expects UTF-8 input.

String.wax:1679

HasNextmethod

public fn HasNext() : bool

Returns whether another element remains without consuming it.

String.wax:1687

MoveNextmethod

public fn MoveNext() : StringSlice

Returns the next cluster as a borrowed slice and advances. Exhaustion returns an empty slice.

String.wax:1695

ToStringmethod

public fn ToString() : string

Provided by the compiler.

ToStringBuffermethod

public fn ToStringBuffer(StringBuilder builder) : int32

Provided by the compiler.