string: bring back strtoul for now
parent
f9593bd857
commit
75e2a29cb5
|
@ -197,19 +197,19 @@ pub fn (s string) f64() f64 {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn (s string) u32() u32 {
|
pub fn (s string) u32() u32 {
|
||||||
$if tinyc {
|
//$if tinyc {
|
||||||
return u32(s.int()) // TODO
|
//return u32(s.int()) // TODO
|
||||||
} $else {
|
//} $else {
|
||||||
return C.strtoul(*char(s.str), 0, 0)
|
return C.strtoul(*char(s.str), 0, 0)
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn (s string) u64() u64 {
|
pub fn (s string) u64() u64 {
|
||||||
$if tinyc {
|
//$if tinyc {
|
||||||
return u64(s.i64()) // TODO
|
//return u64(s.i64()) // TODO
|
||||||
} $else {
|
//} $else {
|
||||||
return C.strtoull(*char(s.str), 0, 0)
|
return C.strtoull(*char(s.str), 0, 0)
|
||||||
}
|
//}
|
||||||
//return C.atoll(s.str) // temporary fix for tcc on windows.
|
//return C.atoll(s.str) // temporary fix for tcc on windows.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue