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

js: port more methods (os, builtin) (#12238)

This commit is contained in:
playX
2021-10-20 16:02:21 +03:00
committed by GitHub
parent 7c1fff3495
commit 57c79770b3
6 changed files with 83 additions and 8 deletions

View File

@@ -155,3 +155,35 @@ pub fn (b []byte) hex() string {
}
return hex
}
pub fn (i int) hex2() string {
return '0x' + i.hex()
}
pub fn (i i8) hex2() string {
return '0x' + i.hex()
}
pub fn (i i16) hex2() string {
return '0x' + i.hex()
}
pub fn (i i64) hex2() string {
return '0x' + i.hex()
}
pub fn (i byte) hex2() string {
return '0x' + i.hex()
}
pub fn (i u16) hex2() string {
return '0x' + i.hex()
}
pub fn (i u32) hex2() string {
return '0x' + i.hex()
}
pub fn (i u64) hex2() string {
return '0x' + i.hex()
}