]> Cypherpunks repositories - gostls13.git/commit
exp/norm: Added Iter type for iterating on segment boundaries. This type is mainly...
authorMarcel van Lohuizen <mpvl@golang.org>
Tue, 21 Feb 2012 12:13:21 +0000 (13:13 +0100)
committerMarcel van Lohuizen <mpvl@golang.org>
Tue, 21 Feb 2012 12:13:21 +0000 (13:13 +0100)
commitecd24f381e189df32f558ffab04b829cd4713649
tree9c7dea44941ba1128d49d3ebd72629282e5b4ec8
parent9666a959cf0f9e622f9442a3e5cc0a941e0957f4
exp/norm: Added Iter type for iterating on segment boundaries.  This type is mainly to be used
by other low-level libraries, like collate.  Extra care has been given to optimize the performance
of normalizing to NFD, as this is what will be used by the collator.  The overhead of checking
whether a string is normalized vs simply decomposing a string is neglible.  Assuming that most
strings are in the FCD form, this iterator can be used to decompose strings and normalize with
minimal overhead.

R=r
CC=golang-dev
https://golang.org/cl/5676057
src/pkg/exp/norm/composition.go
src/pkg/exp/norm/composition_test.go
src/pkg/exp/norm/input.go
src/pkg/exp/norm/iter.go [new file with mode: 0644]
src/pkg/exp/norm/iter_test.go [new file with mode: 0644]
src/pkg/exp/norm/normalize.go
src/pkg/exp/norm/normalize_test.go
src/pkg/exp/norm/normregtest.go