Source File
trieval.go
Belonging Package
vendor/golang.org/x/net/idna
package idna
type info uint16
const (
catSmallMask = 0x3
catBigMask = 0xF8
indexShift = 3
xorBit = 0x4 // interpret the index as an xor pattern
inlineXOR = 0xE000 // These bits are set if the XOR pattern is inlined.
joinShift = 8
joinMask = 0x07
attributesMask = 0x1800
viramaModifier = 0x1800
modifier = 0x1000
rtl = 0x0800
mayNeedNorm = 0x2000
)
type category uint16
const (
unknown category = 0 // not currently defined in unicode.
mapped category = 1
disallowedSTD3Mapped category = 2
deviation category = 3
)
const (
valid category = 0x08
validNV8 category = 0x18
validXV8 category = 0x28
disallowed category = 0x40
disallowedSTD3Valid category = 0x80
ignored category = 0xC0
)
joinZWJ
joinZWNJ
joinVirama
numJoinTypes
)
func ( info) () bool {
return &0x3 != 0
}
func ( info) () category {
:= & catSmallMask
if != 0 {
return category()
}
return category( & catBigMask)
}
func ( info) () info {
if .isMapped() {
return 0
}
return ( >> joinShift) & joinMask
}
func ( info) () bool {
return &(modifier|catSmallMask) == modifier
}
func ( info) () bool {
return &(attributesMask|catSmallMask) == viramaModifier
![]() |
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. |