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:
@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user