const MaxSegmentSize … type Iter … type iterFunc … // Init initializes i to iterate over src after normalizing it to Form f. func (i *Iter) Init(f Form, src []byte) { … } // InitString initializes i to iterate over src after normalizing it to Form f. func (i *Iter) InitString(f Form, src string) { … } // Seek sets the segment to be returned by the next call to Next to start // at position p. It is the responsibility of the caller to set p to the // start of a segment. func (i *Iter) Seek(offset int64, whence int) (int64, error) { … } // returnSlice returns a slice of the underlying input type as a byte slice. // If the underlying is of type []byte, it will simply return a slice. // If the underlying is of type string, it will copy the slice to the buffer // and return that. func (i *Iter) returnSlice(a, b int) []byte { … } // Pos returns the byte position at which the next call to Next will commence processing. func (i *Iter) Pos() int { … } func (i *Iter) setDone() { … } // Done returns true if there is no more input to process. func (i *Iter) Done() bool { … } // Next returns f(i.input[i.Pos():n]), where n is a boundary of i.input. // For any input a and b for which f(a) == f(b), subsequent calls // to Next will return the same segments. // Modifying runes are grouped together with the preceding starter, if such a starter exists. // Although not guaranteed, n will typically be the smallest possible n. func (i *Iter) Next() []byte { … } func nextASCIIBytes(i *Iter) []byte { … } func nextASCIIString(i *Iter) []byte { … } func nextHangul(i *Iter) []byte { … } func nextDone(i *Iter) []byte { … } // nextMulti is used for iterating over multi-segment decompositions // for decomposing normal forms. func nextMulti(i *Iter) []byte { … } // nextMultiNorm is used for iterating over multi-segment decompositions // for composing normal forms. func nextMultiNorm(i *Iter) []byte { … } // nextDecomposed is the implementation of Next for forms NFD and NFKD. func nextDecomposed(i *Iter) (next []byte) { … } func doNormDecomposed(i *Iter) []byte { … } func nextCGJDecompose(i *Iter) []byte { … } // nextComposed is the implementation of Next for forms NFC and NFKC. func nextComposed(i *Iter) []byte { … } func doNormComposed(i *Iter) []byte { … } func nextCGJCompose(i *Iter) []byte { … }