Description
Apply a leading-plus policy to a restricted decimal string without numerical rounding.
Scientific and financial text formatting separates literal representation from numerical interpretation. A range dash differs from a minus sign, an explicit plus differs from rounding, and asymmetric uncertainty labels need their original units and statistical meaning. Preserving text does not validate the underlying measurement or amount.
Apply a leading-plus policy to a restricted decimal string without numerical rounding.
When to use this tool
Use Decimal Leading Plus Sign Policy when checking the stated literal range, sign, uncertainty or symbol-placement convention.
How to use the tool and how it works
- Enter decimalText, addLeadingPlus. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read formatted. Use the output convention below.
Require optional-sign decimal text with no exponent or redundant integer leading zeros. Preserve all negative text; for nonnegative text remove any existing plus and re-add it only when addLeadingPlus=true.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| decimalText | Optional sign, integer part without redundant zeros and optional fractional digits; no exponent or locale syntax. | Required. Text; maximum UTF-16 length 8192. |
| addLeadingPlus | Add Leading Plus | Required. Boolean. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| formatted | Formatted | Required. Text; maximum UTF-16 length 8192. |
{
"input": {
"decimalText": "12.50",
"addLeadingPlus": true
},
"output": {
"formatted": "+12.50"
}
} Limitations and assumptions
- Negative zero remains negative and decimal digits are not numerically rounded or reinterpreted; this is a restricted string format, not locale-aware number formatting.
- Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
Alternative or Complementary methods
Use a complete unit/statistical or locale-aware formatting workflow when validating numbers, uncertainty, currency identity and reporting conventions.
References
Similar or alternative tools
- Currency Symbol Placement Token
Place a supplied currency symbol according to an explicit formatting convention.
- Feature ID Stringification Policy
Serialize an already numeric GeoJSON Feature identifier as a number or string.