Source File
fold.go
Belonging Package
golang.org/x/text/cases
// Copyright 2016 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package cases
import
type caseFolder struct{ transform.NopResetter }
// caseFolder implements the Transformer interface for doing case folding.
func ( *caseFolder) (, []byte, bool) (, int, error) {
:= context{dst: , src: , atEOF: }
for .next() {
foldFull(&)
.checkpoint()
}
return .ret()
}
func ( *caseFolder) ( []byte, bool) ( int, error) {
:= context{src: , atEOF: }
for .next() && isFoldFull(&) {
.checkpoint()
}
return .retSpan()
}
func makeFold( options) transform.SpanningTransformer {
// TODO: Special case folding, through option Language, Special/Turkic, or
// both.
// TODO: Implement Compact options.
return &caseFolder{}
}
![]() |
The pages are generated with Golds v0.6.7. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project 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. |