Source File
graphic.go
Belonging Package
unicode
package unicode
const (
pC = 1 << iota // a control character.
pP // a punctuation character.
pN // a numeral.
pS // a symbolic character.
pZ // a spacing character.
pLu // an upper-case letter.
pLl // a lower-case letter.
pp // a printable character according to Go's definition.
pg = pp | pZ // a graphical character according to the Unicode definition.
pLo = pLl | pLu // a letter that is neither upper nor lower case.
pLmask = pLo
)
var GraphicRanges = []*RangeTable{
L, M, N, P, S, Zs,
}
var PrintRanges = []*RangeTable{
L, M, N, P, S,
}
if uint32() <= MaxLatin1 {
return properties[uint8()]&pg != 0
}
return In(, GraphicRanges...)
}
func ( rune) bool {
if uint32() <= MaxLatin1 {
return properties[uint8()]&pp != 0
}
return In(, PrintRanges...)
}
return false
}
func ( rune) bool {
if uint32() <= MaxLatin1 {
return properties[uint8()]&(pLmask) != 0
}
return isExcludingLatin(Letter, )
}
return isExcludingLatin(Mark, )
}
func ( rune) bool {
if uint32() <= MaxLatin1 {
return properties[uint8()]&pN != 0
}
return isExcludingLatin(Number, )
}
if uint32() <= MaxLatin1 {
switch {
case '\t', '\n', '\v', '\f', '\r', ' ', 0x85, 0xA0:
return true
}
return false
}
return isExcludingLatin(White_Space, )
}
func ( rune) bool {
if uint32() <= MaxLatin1 {
return properties[uint8()]&pS != 0
}
return isExcludingLatin(Symbol, )
![]() |
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. |