Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Info
titleAvailability

This routine is available starting with katl-commons SIL Engine™ 2.5.


Syntax

formatNumber(number, format)

...

Excerpt

Formats a number according to a format string.


Parameters

ParameterTypeRequiredDescription
numberNumberYesNumber to be formatted.
formatStringYesString that specifies the format.

Return type

string, the formatted number.

...

The symbols are described in the following table:

 

SymbolDescription
0a digit
#a digit, zero shows as absent
.placeholder for decimal separator
,placeholder for grouping separator
Eseparates mantissa and exponent for exponential formats
;separates formats
-default negative prefix
%multiply by 100 and show as percentage
?multiply by 1000 and show as per mille
$currency sign; replaced by currency symbol; if doubled, replaced by international currency symbol; if present in a pattern, the monetary decimal separator is used instead of the decimal separator
Xany other characters can be used in the prefix or suffix
'used to quote special characters in a prefix or suffix

See also

Filter by label (Content by label)
showLabelsfalse
showSpacefalse
cqllabel = "math_routines"
labelsmath_routines