Source File
letter.go
Belonging Package
unicode
package unicode
const (
MaxRune = '\U0010FFFF' // Maximum valid Unicode code point.
ReplacementChar = '\uFFFD' // Represents invalid code points.
MaxASCII = '\u007F' // maximum ASCII value.
MaxLatin1 = '\u00FF' // maximum Latin-1 value.
)
type RangeTable struct {
R16 []Range16
R32 []Range32
LatinOffset int // number of entries in R16 with Hi <= MaxLatin1
}
type SpecialCase []CaseRange
const (
UpperLower = MaxRune + 1 // (Cannot be a valid delta.)
)
const linearMax = 18
func ( *RangeTable, rune) bool {
:= .R16
if len() > 0 && <= rune([len()-1].Hi) {
return is16(, uint16())
}
:= .R32
if len() > 0 && >= rune([0].Lo) {
return is32(, uint32())
}
return false
}
func ( *RangeTable, rune) bool {
:= .R16
if := .LatinOffset; len() > && <= rune([len()-1].Hi) {
return is16([:], uint16())
}
:= .R32
if len() > 0 && >= rune([0].Lo) {
return is32(, uint32())
}
return false
}
if uint32() <= MaxLatin1 {
return properties[uint8()]&pLmask == pLu
}
return isExcludingLatin(Upper, )
}
if uint32() <= MaxLatin1 {
return properties[uint8()]&pLmask == pLl
}
return isExcludingLatin(Lower, )
}
func ( int, rune) rune {
, _ = to(, , CaseRanges)
return
}
![]() |
The pages are generated with Golds v0.3.2-preview. (GOOS=darwin 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. |