Skip to main content

Text to number

Read a number from text written for a locale, or with the decimal and grouping separators you give.

Command in the String toolkit · id ooa.string/to_number · 5 inputs (1 required), 1 output

Inputs​

InputTypeRequiredDefaultWhat it is
TextStringYesText such as 1,234.56, 1.234,56, $ 1,200.50, (1,234.00) or 1,234.00- (negative).
LocaleStringNoen-USLocale the text is written in, e.g. en-US, de-DE, fr-FR.
Decimal separatorStringNoDecimal separator; overrides the locale.
Grouping separatorStringNoThousands separator; overrides the locale.
Ignore currencyBooleanNotrueIgnore a currency symbol or code before or after the number ($, €, ₹, USD, EUR, Rs.); when off such text is not a number.

Outputs​

OutputTypeWhat it is
resultNumberThe number.