Mendix 7 is no longer supported unless you have Extended Support (for details, please contact Mendix Support). Mendix 7 documentation will remain available for customers with Extended Support until July, 2024.
Parse and Format Float Function Calls
See Class DecimalFormat for all pattern possibilities.
parseFloat
Parses a String value to a Float value. Takes optional parameters for format and default value.
Input parameters
- value to parse Type: String
- pattern to match on (optional) Type: String
- default value (optional) Type: Float
Output
A Float value that matches the input String value. If the value cannot be parsed (as in, does not match the format parameter or contains illegal characters) the default value will be returned. If no default value was provided, an error occurs.
|
|
returns:
|
|
with default value:
|
|
returns:
|
|
with format parameter:
|
|
returns:
|
|
formatFloat
Converts a Float value to a String value, according to a specified format.
Input parameters
- value to convert Type: Float
- format that the result should be in Type: String
Output
A String representation of the Float value, in the format specified by the ‘format’ parameter. Type: String
|
|
returns:
|
|