Skip to content

Main content

Currency Symbol Placement Token

Place an explicit currency symbol before or after unchanged amount text with a caller-selected spacing policy.

Loading tool…

Description

Place a supplied currency symbol according to an explicit formatting convention.

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.

Place a supplied currency symbol according to an explicit formatting convention.

When to use this tool

Use Currency Symbol Placement Token when checking the stated literal range, sign, uncertainty or symbol-placement convention.

How to use the tool and how it works

  1. Enter amountText, currencySymbol, symbolAfter, insertSpace. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. Read formatted. Use the output convention below.

Require nonempty amount text and currency symbol. Place the symbol before or after, inserting one ASCII space only when requested.1

Input fieldMeaning and unitsAccepted input
amountTextAmount TextRequired. Text; minimum UTF-16 length 1; maximum UTF-16 length 8192.
currencySymbolCurrency SymbolRequired. Text; minimum UTF-16 length 1; maximum UTF-16 length 8192.
symbolAfterSymbol AfterRequired. Boolean.
insertSpaceInsert SpaceRequired. Boolean.
Output fieldInterpretationReturned shape
formattedFormattedRequired. Text; maximum UTF-16 length 8192.
json
{
  "input": {
    "amountText": "12.50",
    "currencySymbol": "$",
    "symbolAfter": false,
    "insertSpace": false
  },
  "output": {
    "formatted": "$12.50"
  }
}

Limitations and assumptions

  • The amount and symbol are not parsed or validated; no currency conversion, locale selection or financial calculation occurs.
  • 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

  1. Calculation and input contract: format/currency-symbol-placement-token — tool.io

Similar or alternative tools