refillLocaleSkeleton
refillLocaleSkeleton(
numeral,skeleton,minusSign):string
Defined in: packages/math-numbers/src/refill-locale-skeleton.ts:25
Re-emits an exact decimal numeral through a locale’s own skeleton, for the
values Intl.NumberFormat refuses to render in full.
Intl caps a rendering at 100 fraction digits and 21 significant digits, so
a Decimal or a wide binary float longer than that comes back rounded. This
takes the numeral as given, maps its digits into the locale’s numbering
system, inserts group separators at the sizes the skeleton reports, and
splices the result between the skeleton’s prefix and suffix — so the output
matches what Intl would produce if it had no cap.
Nothing is rounded here. The caller has already decided how many digits to show; this only renders them.
O(n) in the digit count.
Parameters
Section titled “Parameters”numeral
Section titled “numeral”string
A plain decimal numeral: optional -, digits, optional .
and more digits. No exponent, and no separators.
skeleton
Section titled “skeleton”The locale’s rendering, from resolveLocaleSkeleton.
minusSign
Section titled “minusSign”string
The locale’s minus sign, which Intl reports per value.
Returns
Section titled “Returns”string
The localized rendering.