LeadingZeroFormatter
is typically used in the XML Renderer Framework, but can be invoked programmatically
as in the following example which evaluates to "0089":
caplin.element.formatter.LeadingZeroFormatter.format(89, {length:4})
Attributes | Name and Description |
---|---|
|
caplin.element.formatter.LeadingZeroFormatter()
|
Attributes | Name and Description |
---|---|
|
String
format(Variant vValue, Map mAttributes)
Pads the integer part of a number with as many leading zeros needed to reach the specified size. |
►
caplin.element.formatter.LeadingZeroFormatter()
►
String
format(Variant vValue, Map mAttributes)
Pads the integer part of a number with as many leading zeros needed to reach the specified size.
Attribute Options:
Option | Description |
---|---|
size | the minimum size of the padded number (defaults to zero) |
Variant | vValue | the number (String or Number type). |
Map | mAttributes | the map of attributes. |