mirror of
https://github.com/vlang/v.git
synced 2025-09-13 22:42:26 +03:00
js: add more tests to builtin/js and implement more builtin functions (#12049)
This commit is contained in:
parent
129c81f34d
commit
9145cd66ec
10 changed files with 2384 additions and 18 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue