mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
js,strconv: port some functions to JS backend, improve rune.str() (#12460)
This commit is contained in:
@@ -18,14 +18,14 @@ pub fn (c rune) repeat(count int) string {
|
||||
return c.str()
|
||||
}
|
||||
res := ''
|
||||
#res.str = String.fromCharCode(c.val)
|
||||
#res.str = String.fromCharCode(Number(c.val))
|
||||
|
||||
return res.repeat(count)
|
||||
}
|
||||
|
||||
pub fn (c rune) str() string {
|
||||
res := ''
|
||||
#res.str = String.fromCharCode(c.val)
|
||||
#res.str = String.fromCharCode(Number(c.val))
|
||||
|
||||
return res
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user