Documentation
¶
Overview ¶
Package plural evaluates generated CLDR plural rules.
It provides the shared rule engine used by PluralRules and formatter code that needs localized category selection.
Only internal plural-aware formatters should use this package; public callers use pluralrules APIs.
Index ¶
- type Category
- type OperandValue
- func (v OperandValue) Between(start, end int64) bool
- func (v OperandValue) Cmp(n int64) int
- func (v OperandValue) Equal(n int64) bool
- func (v OperandValue) Greater(n int64) bool
- func (v OperandValue) GreaterOrEqual(n int64) bool
- func (v OperandValue) Less(n int64) bool
- func (v OperandValue) LessOrEqual(n int64) bool
- func (v OperandValue) Mod(mod int64) OperandValue
- func (v OperandValue) NotEqual(n int64) bool
- func (v OperandValue) OutsideRange(start, end int64) bool
- func (v OperandValue) String() string
- type OperandsRecord
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OperandValue ¶
type OperandValue struct {
// contains filtered or unexported fields
}
func NewIntegerOperand ¶
func NewIntegerOperand(n int64) OperandValue
func NewOperandValue ¶
func NewOperandValue(formatted string) OperandValue
func NewUnsignedIntegerOperand ¶
func NewUnsignedIntegerOperand(n uint64) OperandValue
func (OperandValue) Between ¶
func (v OperandValue) Between(start, end int64) bool
func (OperandValue) Cmp ¶
func (v OperandValue) Cmp(n int64) int
func (OperandValue) Equal ¶
func (v OperandValue) Equal(n int64) bool
func (OperandValue) Greater ¶
func (v OperandValue) Greater(n int64) bool
func (OperandValue) GreaterOrEqual ¶
func (v OperandValue) GreaterOrEqual(n int64) bool
func (OperandValue) Less ¶
func (v OperandValue) Less(n int64) bool
func (OperandValue) LessOrEqual ¶
func (v OperandValue) LessOrEqual(n int64) bool
func (OperandValue) Mod ¶
func (v OperandValue) Mod(mod int64) OperandValue
func (OperandValue) NotEqual ¶
func (v OperandValue) NotEqual(n int64) bool
func (OperandValue) OutsideRange ¶
func (v OperandValue) OutsideRange(start, end int64) bool
func (OperandValue) String ¶
func (v OperandValue) String() string
type OperandsRecord ¶
type OperandsRecord struct {
N OperandValue
I OperandValue
V int
W int
F OperandValue
T OperandValue
C int
E int
}
func GetIntegerOperands ¶
func GetIntegerOperands(n int64) OperandsRecord
func GetOperands ¶
func GetOperands(formatted string, exponent int) OperandsRecord
func GetUnsignedIntegerOperands ¶
func GetUnsignedIntegerOperands(n uint64) OperandsRecord
Click to show internal directories.
Click to hide internal directories.