mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
atof implementation in V
This commit is contained in:

committed by
Alexander Medvednikov

parent
5a56ca0892
commit
3dbf7a4039
@ -298,11 +298,13 @@ pub fn (s string) i64() i64 {
|
||||
}
|
||||
|
||||
pub fn (s string) f32() f32 {
|
||||
return C.atof(charptr(s.str))
|
||||
//return C.atof(charptr(s.str))
|
||||
return f32(strconv.atof64(s))
|
||||
}
|
||||
|
||||
pub fn (s string) f64() f64 {
|
||||
return C.atof(charptr(s.str))
|
||||
//return C.atof(charptr(s.str))
|
||||
return strconv.atof64(s)
|
||||
}
|
||||
|
||||
pub fn (s string) u32() u32 {
|
||||
|
Reference in New Issue
Block a user