-
Notifications
You must be signed in to change notification settings - Fork 5
/
common.go
39 lines (29 loc) · 926 Bytes
/
common.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// Generated by running
// maketables -url=http://www.unicode.org/Public/cldr/26/core.zip -iana=http://www.iana.org/assignments/language-subtag-registry -tld=http://www.iana.org/domains/root/db
// automatically with go generate.
// DO NOT EDIT
package language
// This file contains code common to the maketables.go and the package code.
const (
curDigitBits = 3
curDigitMask = 1<<curDigitBits - 1
curRoundBits = 0 // Appear to be always zero.
)
type currencyInfo int
func mkCurrencyInfo(round, decimal int) string {
return string([]byte{byte(round<<curDigitBits | decimal)})
}
func (c currencyInfo) round() int {
return int(c >> curDigitBits)
}
func (c currencyInfo) decimals() int {
return int(c & curDigitMask)
}
// langAliasType is the type of an alias in langAliasMap.
type langAliasType int8
const (
langDeprecated langAliasType = iota
langMacro
langLegacy
langAliasTypeUnknown langAliasType = -1
)