BreakUpLargeNumbers
Jump to navigation
Jump to search
Divides digits into groups using a localized delimiter character.
valueString = BreakUpLargeNumbers(value)
Arguments
- value
- number - The number to convert into a localized string
Returns
- valueString
- string - The whole-number portion converted into a string if greater than 1000, or truncated to two decimals if less than 1000.
Details
- Large numbers are grouped into thousands and millions with a
LARGE_NUMBER_SEPERATOR
, but no further grouping happens for even larger numbers (billions). - Small numbers with a decimal portion are separated with a
DECIMAL_SEPERATOR
and truncated to two decimal places. - Not intended for use with negative numbers.
Example
BreakUpLargeNumbers(123.456789) -- 123.45
BreakUpLargeNumbers(1234567.89) -- 1,234,567
BreakUpLargeNumbers(1234567890) -- 1234,567,890
Patch changes
Patch 6.0.2 (2014-10-14): Transferred from FrameXML to userdata in the game engine; no impact on functionality.[1]
Patch 5.0.4 (2012-08-28): Added.[2]
See also
- GetLocale
- FillLocalizedClassList
- FormatLargeNumber
References
- ^ 2014-10-14, UIParent.lua, version 6.0.2.19033, near line 4131, archived at Townlong-Yak
- ^ 2012-08-21, UIParent.lua, version 5.0.4.16016, near line 4017, archived at Townlong-Yak