mirror of
https://github.com/vlang/v.git
synced 2025-09-14 06:52:36 +03:00
strings, builtin: remove strings.Builder.clear()
, fix array.clear()
not working in the JS backend (#23992)
This commit is contained in:
parent
20d7d9758b
commit
15c0e6f2bd
3 changed files with 3 additions and 12 deletions
|
@ -22,10 +22,6 @@ pub fn (mut b Builder) write_byte(data u8) {
|
|||
b << data
|
||||
}
|
||||
|
||||
pub fn (mut b Builder) clear() {
|
||||
b = []u8{cap: b.cap}
|
||||
}
|
||||
|
||||
pub fn (mut b Builder) write_u8(data u8) {
|
||||
b << data
|
||||
}
|
||||
|
@ -67,7 +63,7 @@ pub fn (mut b Builder) str() string {
|
|||
|
||||
#for (const c of b.val.arr.arr)
|
||||
#s.str += String.fromCharCode(+c)
|
||||
b.trim(0)
|
||||
b.clear()
|
||||
return s
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue