kubernetes/vendor/golang.org/x/text/internal/number/pattern.go

type Pattern

type RoundingContext

// RoundSignificantDigits returns the number of significant digits an
// implementation of Convert may round to or n < 0 if there is no maximum or
// a maximum is not recommended.
func (r *RoundingContext) RoundSignificantDigits() (n int) {}

// RoundFractionDigits returns the number of fraction digits an implementation
// of Convert may round to or n < 0 if there is no maximum or a maximum is not
// recommended.
func (r *RoundingContext) RoundFractionDigits() (n int) {}

// SetScale fixes the RoundingContext to a fixed number of fraction digits.
func (r *RoundingContext) SetScale(scale int) {}

func (r *RoundingContext) SetPrecision(prec int) {}

func (r *RoundingContext) isScientific() bool {}

func (f *Pattern) needsSep(pos int) bool {}

type PatternFlag

const AlwaysSign

const ElideSign

const AlwaysExpSign

const AlwaysDecimalSeparator

const ParenthesisForNegative

const PadAfterNumber

const PadAfterAffix

const PadBeforePrefix

const PadAfterPrefix

const PadBeforeSuffix

const PadAfterSuffix

const PadMask

type parser

func (p *parser) setError(err error) {}

func (p *parser) updateGrouping() {}

var errMultiplePadSpecifiers

var errInvalidPadSpecifier

var errInvalidQuote

var errAffixTooLarge

var errDuplicatePercentSign

var errDuplicatePermilleSign

var errUnexpectedEnd

// ParsePattern extracts formatting information from a CLDR number pattern.
//
// See https://unicode.org/reports/tr35/tr35-numbers.html#Number_Format_Patterns.
func ParsePattern(s string) (f *Pattern, err error) {}

func (p *parser) parseSubPattern(s string) string {}

func (p *parser) parsePad(s string, f PatternFlag) (tail string) {}

func (p *parser) parseAffix(s string) string {}

type state

// parse repeatedly applies a state function on the given string until a
// termination condition is reached.
func (p *parser) parse(fn state, s string) (tail string) {}

func (p *parser) affix(r rune) state {}

func (p *parser) escapeFirst(r rune) state {}

func (p *parser) escape(r rune) state {}

// number parses a number. The BNF says the integer part should always have
// a '0', but that does not appear to be the case according to the rest of the
// documentation. We will allow having only '#' numbers.
func (p *parser) number(r rune) state {}

func (p *parser) integer(r rune) state {}

func (p *parser) sigDigits(r rune) state {}

func (p *parser) sigDigitsFinal(r rune) state {}

func (p *parser) normalizeSigDigitsWithExponent() state {}

func (p *parser) fraction(r rune) state {}

func (p *parser) exponent(r rune) state {}