BracketsFormatter
is typically used in the XML Renderer Framework, but can be invoked programmatically
as in the following example which evaluates to "(123)":
caplin.element.formatter.BracketsFormatter.format(-123, {})
See caplin.element.parser.BracketsParser for the complementary parser.
Attributes | Name and Description |
---|---|
|
caplin.element.formatter.BracketsFormatter()
|
Attributes | Name and Description |
---|---|
|
String
format(Variant vValue, Map mAttributes)
Formats a negative number into a value with brackets. |
►
caplin.element.formatter.BracketsFormatter()
►
String
format(Variant vValue, Map mAttributes)
Formats a negative number into a value with brackets. Any form of suffix is assumed to be part of the number and is included in the conversion. Non-negative numeric values are unchanged.
For example, "-1.618" and "-2BIL" are converted to "(1.618)" and "(2BIL)" respectively.Variant | vValue | the number (String or Number type). |
Map | mAttributes | (unused) |