number
FEEL built-in function · FEEL numeric functions
number(from, grouping separator?, decimal separator?)
Parses a string into a number, optionally describing which grouping and decimal separators the string uses.
Without separator arguments only a plain number is accepted: an optional sign, digits, a dot as the decimal mark and an optional exponent. Thousands separators make the string invalid unless you name them.
Parameters
| Parameter | Type | Description |
|---|---|---|
| from | string | the numeric string to parse |
| grouping separator | string | thousands separator used in the string (optional) |
| decimal separator | string | decimal mark used in the string (optional) |
Examples
number("1 000,5", " ", ",")
1000.5
Try it ↑
number("1250.75")
1250.75
Try it ↑
Edge cases and null handling
number("1,000.5", ",", ".")
1000.5
Try it ↑
number("1e3")
1000
Try it ↑
number("12abc")
null
Try it ↑
Part of FEEL numeric functions: a side-by-side rounding table, how FEEL number equality works, and every numeric function with its edge cases.
Related functions
Defined by the OMG DMN 1.6 specification, chapter 10.3.4 (built-in functions).