Parses integer (same semantics as Number.parseInt). The result is wrapped into opt (so NaN will become None).
Number.parseInt
NaN
parseInt('0') // Some(0)parseInt('gin') // NoneparseInt('1.1') // Some(1) Copy
parseInt('0') // Some(0)parseInt('gin') // NoneparseInt('1.1') // Some(1)
Generated using TypeDoc
Parses integer (same semantics as
Number.parseInt
). The result is wrapped into opt (soNaN
will become None).