mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
js: add initial support for runes (#12077)
This commit is contained in:
@ -89,3 +89,11 @@ pub fn (mut b Builder) cut_to(pos int) string {
|
||||
}
|
||||
return b.cut_last(b.len - pos)
|
||||
}
|
||||
|
||||
pub fn (mut b Builder) write_runes(runes []rune) {
|
||||
for r in runes {
|
||||
res := string(r)
|
||||
#res.str = String.fromCharCode(r.val)
|
||||
b << res.bytes()
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user