Parse
(Automatically adding template at the end of the page.)
(Adding message template to the top of the page)
Line 1: Line 1:
{{message|Write the content here to display this box}}
Most value types - for example, [[Integer]] and [[Decimal]] - have a function "parse" to convert a string into a value.
Most value types - for example, [[Integer]] and [[Decimal]] - have a function "parse" to convert a string into a value.



Revision as of 22:33, 16 June 2024

This page was created by Lars.olofsson@mdriven.net on 2020-11-25. Last edited by Stephanie@mdriven.net on 2025-01-22.

Write the content here to display this box

Most value types - for example, Integer and Decimal - have a function "parse" to convert a string into a value.

Example

Use as follows:

Decimal.parse('10')
Integer.parse('5')
Error Handling

If the provided string isn't convertible to the type, the resulting value is NULL.

Decimal.parse('x').isNull

Returns true.