Parsing of Strings into Floats and Integers
This adds support for parsing a String into a Float and an Integer. There are two ways of doing so:
- By sending
to_integer
orto_float
to aString
. - Using
Integer.from_string
orFloat.from_string
.
Using to_integer
and to_float
will perform a lossy conversion:
returning 0 or 0.0 for invalid input. Using the from_string
methods
will result in a strict conversion, with an error being thrown for
invalid input.
Fixes #134 (closed) Fixes #156 (closed)