strFormatNumber(
const val, // value to format
const width, // width of field
[const frac]) // # of fractional digits (default = 0)
Formats a number for output. The result is a string of width characters
with the value right adjusted. If the value does not fit into width, the
result will be as long as the value requires at least.
Examples:
strFormatNumber(1.5, 10, 2); // ' 1.50'
strFormatNumber(123.456, 10, 2); // ' 123.45'
strFormatNumber(123.456, 10); // ' 123'
|