1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

builtin: add .str method for i/usize (#11441)

This commit is contained in:
Enzo
2021-09-08 12:41:08 +02:00
committed by GitHub
parent e3b65092d6
commit 56ad5d72ef
2 changed files with 13 additions and 28 deletions

View File

@ -15,14 +15,13 @@ pub fn ptr_str(ptr voidptr) string {
return buf1
}
// TODO uncomment to have string representation of i/usize
// pub fn (x isize) str() string {
// return u64(x).str()
// }
//
// pub fn (x usize) str() string {
// return u64(x).str()
// }
pub fn (x isize) str() string {
return i64(x).str()
}
pub fn (x usize) str() string {
return u64(x).str()
}
pub fn (x size_t) str() string {
return u64(x).str()