| 1 | module strconv |
| 2 | |
| 3 | // atof64 return a f64 from a string doing a parsing operation |
| 4 | pub fn atof64(s string) !f64 { |
| 5 | // TODO: handle parsing invalid numbers as close as possible to the pure V version |
| 6 | // that may be slower, but more portable, and will guarantee that higher level code |
| 7 | // works the same in the JS version, as well as in the C and Native versions. |
| 8 | res := 0.0 |
| 9 | #res.val = Number(s.str) |
| 10 | |
| 11 | return res |
| 12 | } |
| 13 |