package graphemes

import 

type Iterator[ iterators.Stringish] struct {
	*iterators.Iterator[]
}

var (
	splitFuncString = splitFunc[string]
	splitFuncBytes  = splitFunc[[]byte]
)

// FromString returns an iterator for the grapheme clusters in the input string.
// Iterate while Next() is true, and access the grapheme via Value().
func ( string) Iterator[string] {
	return Iterator[string]{
		iterators.New(splitFuncString, ),
	}
}

// FromBytes returns an iterator for the grapheme clusters in the input bytes.
// Iterate while Next() is true, and access the grapheme via Value().
func ( []byte) Iterator[[]byte] {
	return Iterator[[]byte]{
		iterators.New(splitFuncBytes, ),
	}
}