Std.Decimal.parse
1 declaration
fn
parse: Str -> Option[Decimal]This is a callable function.
What it does
Read a decimal from text, answering None when the text is not one.
There is deliberately no conversion from Float64. A binary float that
prints as 0.1 is not the number 0.1, and letting it become 0.1d
silently would import exactly the error this type exists to avoid.
Read the signature
- The text after the name is the type checked by Pudu.
- Read arrows from left to right: inputs come first, and the final type is returned.
- Names inside [ ] are type arguments, such as the item type held by a collection.
- Option holds Some(value) or None when no value is available.
