$$numberparse
Parses a number from string
Usage​
"$$numberparse(<pattern>,[locale],[grouping],[decimal]):{input}"
"$$numberparse(BASE,[radix]):{input}"
Returns​
number
Arguments​
Argument | Type | Values | Required / Default Value | Description |
---|---|---|---|---|
pattern | String | DecimalFormat pattern / BASE | Yes | See tutorial |
locale | Enum | A language tag (e.g. en-US ) | en-US | Locale to use (language and country specific formatting; set by Java) |
grouping | String | Single character string | , | A custom character to be used for grouping |
decimal | String | Single character string | . | A custom character to be used for decimal point |
radix | Integer | 10 | Radix to be used in interpreting input |
Examples​
Input
Definition
Output
"123,456,789.88"
"$$numberparse('#,##0.00'):$"
123456789.88
"123.456.789,88"
"$$numberparse('#,##0.00',en-US,'.',','):$"
123456789.88
"75bcd15"
"$$numberparse(BASE,16):$"
123456789
"00001010"
"$$numberparse(BASE,2):$"
10