Parse
No edit summary
(Automatically adding template at the end of the page.)
 
(One intermediate revision by the same user not shown)
Line 12: Line 12:
[[Category:OCLOperators]]
[[Category:OCLOperators]]
[[Category:OCL]]
[[Category:OCL]]
{{Edited|July|12|2024}}

Latest revision as of 15:44, 10 February 2024

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.

This page was edited 90 days ago on 02/10/2024. What links here