Versions in this module Expand all Collapse all v0 v0.3.7 May 14, 2022 Changes in this version + const AlwaysDecimalSeparator + const AlwaysExpSign + const AlwaysSign + const CLDRVersion + const ElideSign + const PadAfterAffix + const PadAfterNumber + const PadAfterPrefix + const PadAfterSuffix + const PadBeforePrefix + const PadBeforeSuffix + const PadMask + const ParenthesisForNegative + type Converter interface + Convert func(d *Decimal, r RoundingContext) + type Decimal struct + func (d *Decimal) Convert(r RoundingContext, number interface{}) + func (d *Decimal) ConvertFloat(r RoundingContext, x float64, size int) + func (d *Decimal) ConvertInt(r RoundingContext, signed bool, x uint64) + func (x *Decimal) String() string + type Digits struct + Comma uint8 + End int32 + IsScientific bool + func FormatDigits(d *Decimal, r RoundingContext) Digits + func (d *Digits) NumFracDigits() int + type Formatter struct + func (f *Formatter) Append(dst []byte, x interface{}) []byte + func (f *Formatter) Format(dst []byte, d *Decimal) []byte + func (f *Formatter) InitDecimal(t language.Tag) + func (f *Formatter) InitEngineering(t language.Tag) + func (f *Formatter) InitPattern(t language.Tag, pat *Pattern) + func (f *Formatter) InitPerMille(t language.Tag) + func (f *Formatter) InitPercent(t language.Tag) + func (f *Formatter) InitScientific(t language.Tag) + func (f *Formatter) Render(dst []byte, d Digits) []byte + type Info struct + func InfoFromLangID(compactIndex compact.ID, numberSystem string) Info + func InfoFromTag(t language.Tag) Info + func (n Info) AppendDigit(dst []byte, digit byte) []byte + func (n Info) Digit(asciiDigit rune) rune + func (n Info) IsDecimal() bool + func (n Info) Symbol(t SymbolType) string + func (n Info) WriteDigit(dst []byte, asciiDigit rune) int + type Pattern struct + Affix string + Flags PatternFlag + FormatWidth uint16 + GroupingSize [2]uint8 + NegOffset uint16 + Offset uint16 + PadRune rune + func ParsePattern(s string) (f *Pattern, err error) + type PatternFlag uint8 + type RoundingContext struct + DigitShift uint8 + Increment uint32 + IncrementScale uint8 + MaxFractionDigits int16 + MaxIntegerDigits uint8 + MaxSignificantDigits int16 + MinExponentDigits uint8 + MinFractionDigits uint8 + MinIntegerDigits uint8 + MinSignificantDigits uint8 + Mode RoundingMode + func (r *RoundingContext) RoundFractionDigits() (n int) + func (r *RoundingContext) RoundSignificantDigits() (n int) + func (r *RoundingContext) SetPrecision(prec int) + func (r *RoundingContext) SetScale(scale int) + type RoundingMode byte + const AwayFromZero + const ToNearestAway + const ToNearestEven + const ToNearestZero + const ToNegativeInf + const ToPositiveInf + const ToZero + func (i RoundingMode) String() string + type SymbolType int + const NumSymbolTypes + const SymDecimal + const SymExponential + const SymGroup + const SymInfinity + const SymList + const SymMinusSign + const SymNan + const SymPerMille + const SymPercentSign + const SymPlusSign + const SymSuperscriptingExponent + const SymTimeSeparator + type VisibleDigits interface + Digits func(buf []byte, t language.Tag, scale int) Digits