Parses float (same semantics as Number.parseFloat). The result is wrapped into opt (so NaN will become None).
Number.parseFloat
NaN
parseFloat('0') // Some(0)parseFloat('-1.2') // Some(-1.2)parseFloat('xFF') // None Copy
parseFloat('0') // Some(0)parseFloat('-1.2') // Some(-1.2)parseFloat('xFF') // None
Generated using TypeDoc
Parses float (same semantics as
Number.parseFloat
). The result is wrapped into opt (soNaN
will become None).