Options
All
  • Public
  • Public/Protected
  • All
Menu

Provides a compilation enforced mapping of the Custom Numeric Format Specifiers.

Type parameters

  • T

    The type of the specifier's value/handler.

Hierarchy

Indexable

[key: string]: T

Provides a compilation enforced mapping of the Custom Numeric Format Specifiers.

Index

Properties

decimalPoint

decimalPoint: T

Format specifier . determines the location of the decimal separator in the result string.

digitPlaceholder

digitPlaceholder: T

Format specifier # replaces symbol with the corresponding digit if one is present; otherwise, no digit appears in the result string.

escapeChar

escapeChar: T

Format specifier \ causes the next character to be interpreted as a literal rather than as a custom format specifier.

exponent

exponent: T

Format specifier e or E followed by + or -, and at least one 0 determines the presence of an exponential notation specifier.

The "E+" and "e+" formats indicate that a plus sign or minus sign should always precede the exponent. The "E", "E-", "e", or "e-" formats indicate that a sign character should precede only negative exponents.

groupSeparatorOrNumberScaling

groupSeparatorOrNumberScaling: T

Format specifier , serves as both a group separator and a number scaling specifier.

literalStringDelimeterDouble

literalStringDelimeterDouble: T

Format specifier " indicates that the enclosed characters should be copied to the result string unchanged.

literalStringDelimeterSingle

literalStringDelimeterSingle: T

Format specifier ' indicates that the enclosed characters should be copied to the result string unchanged.

perMillePlaceholder

perMillePlaceholder: T

Format specifier multiplies a number by 1000 and inserts a localized per mille symbol in the result string.

percentagePlaceholder

percentagePlaceholder: T

Format specifier % multiplies a number by 100 and inserts a localized percentage symbol in the result string.

sectionSeparator

sectionSeparator: T

Format specifier ; defines sections with separate format strings for positive, negative, and zero numbers - in that order.

To produce this behavior, a custom format string can contain up to three sections separated by semicolons:

  • One section: The format string applies to all values;
  • Two sections: The first section applies to positive values and zeros, and the second section applies to negative values. If the number to be formatted is negative, but becomes zero after rounding according to the format in the second section, the resulting zero is formatted according to the first section;
  • Three sections: The first section applies to positive values, the second section applies to negative values, and the third section applies to zeros. The second section can be left empty (by having nothing between the semicolons), in which case the first section applies to all nonzero values. If the number to be formatted is nonzero, but becomes zero after rounding according to the format in the first or second section, the resulting zero is formatted according to the third section.

zeroPlaceholder

zeroPlaceholder: T

Format specifier 0 replaces the zero with the corresponding digit if one is present; otherwise, zero appears in the result string.

Generated using TypeDoc