package norm
Import Path
vendor/golang.org/x/text/unicode/norm (on golang.org and go.dev)
Dependency Relation
imports 6 packages, and imported by one package
Involved Source Files
composition.go
forminfo.go
input.go
iter.go
d-> normalize.go
readwriter.go
tables12.0.0.go
transform.go
trie.go
Exported Type Names
type Form int
A Form denotes a canonical representation of Unicode code points.
The Unicode-defined normalization and equivalence forms are:
NFC Unicode Normalization Form C
NFD Unicode Normalization Form D
NFKC Unicode Normalization Form KC
NFKD Unicode Normalization Form KD
For a Form f, this documentation uses the notation f(x) to mean
the bytes or string x converted to the given form.
A position n in x is called a boundary if conversion to the form can
proceed independently on both sides:
f(x) == append(f(x[0:n]), f(x[n:])...)
References: https://unicode.org/reports/tr15/ and
https://unicode.org/notes/tn5/.
(T) Append(out []byte, src ...byte) []byte
(T) AppendString(out []byte, src string) []byte
(T) Bytes(b []byte) []byte
(T) FirstBoundary(b []byte) int
(T) FirstBoundaryInString(s string) int
(T) IsNormal(b []byte) bool
(T) IsNormalString(s string) bool
(T) LastBoundary(b []byte) int
(T) NextBoundary(b []byte, atEOF bool) int
(T) NextBoundaryInString(s string, atEOF bool) int
(T) Properties(s []byte) Properties
(T) PropertiesString(s string) Properties
(T) QuickSpan(b []byte) int
(T) QuickSpanString(s string) int
(T) Reader(r io.Reader) io.Reader
(T) Reset()
(T) Span(b []byte, atEOF bool) (n int, err error)
(T) SpanString(s string, atEOF bool) (n int, err error)
(T) String(s string) string
(T) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error)
(T) Writer(w io.Writer) io.WriteCloser
T : vendor/golang.org/x/text/transform.SpanningTransformer
T : vendor/golang.org/x/text/transform.Transformer
func (*Iter).Init(f Form, src []byte)
func (*Iter).InitString(f Form, src string)
const NFC
const NFD
const NFKC
const NFKD
type Iter (struct)
An Iter iterates over a string or byte slice, while normalizing it
to a given Form.
(*T) Done() bool
(*T) Init(f Form, src []byte)
(*T) InitString(f Form, src string)
(*T) Next() []byte
(*T) Pos() int
(*T) Seek(offset int64, whence int) (int64, error)
*T : io.Seeker
type Properties (struct)
Properties provides access to normalization properties of a rune.
(T) BoundaryAfter() bool
(T) BoundaryBefore() bool
(T) CCC() uint8
(T) Decomposition() []byte
(T) LeadCCC() uint8
(T) Size() int
(T) TrailCCC() uint8
func Form.Properties(s []byte) Properties
func Form.PropertiesString(s string) Properties
Exported Values
const GraphemeJoiner = "͏"
GraphemeJoiner is inserted after maxNonStarters non-starter runes.
const MaxSegmentSize = 128
MaxSegmentSize is the maximum size of a byte buffer needed to consider any
sequence of starter and non-starter runes for the purpose of normalization.
const MaxTransformChunkSize = 155
MaxTransformChunkSize indicates the maximum number of bytes that Transform
may need to write atomically for any Form. Making a destination buffer at
least this size ensures that Transform can always make progress and that
the user does not need to grow the buffer on an ErrShortDst.
const Version = "12.0.0"
Version is the Unicode edition from which the tables are derived.
![]() |
The pages are generated with Golds v0.1.6. (GOOS=darwin GOARCH=amd64) Golds is a Go 101 project and developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds. |