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

js: add more tests to builtin/js and implement more builtin functions (#12049)

This commit is contained in:
playX
2021-10-03 10:08:21 +03:00
committed by GitHub
parent 129c81f34d
commit 9145cd66ec
10 changed files with 2384 additions and 18 deletions

View File

@ -21,3 +21,19 @@ pub fn (c byte) str() string {
return res
}
pub fn (c byte) ascii_str() string {
res := ''
#res.str = String.fromCharCode(c.val)
return res
}
pub fn (c byte) repeat(count int) string {
mut res := ''
for _ in 0 .. count {
res += c.ascii_str()
}
return res
}