Basically, I am looking for a function of the following type:
fun string2double(rep: string): double
which converts a string representing a floating point number into the number.
For instance, string2double("3.14")
should return 3.14
.
Basically, I am looking for a function of the following type:
fun string2double(rep: string): double
which converts a string representing a floating point number into the number.
For instance, string2double("3.14")
should return 3.14
.
It can be implemented as follows: