mirror of
https://github.com/vlang/v.git
synced 2025-09-13 14:32:26 +03:00
strings: builder: add clear (#14328)
This commit is contained in:
parent
b04d46770b
commit
aef95721a4
4 changed files with 11 additions and 9 deletions
|
@ -18,13 +18,12 @@ pub fn new_builder(initial_size int) Builder {
|
|||
return []u8{cap: initial_size}
|
||||
}
|
||||
|
||||
[deprecated: 'Use write_u8() instead']
|
||||
pub fn (mut b Builder) write_b(data u8) {
|
||||
pub fn (mut b Builder) write_byte(data byte) {
|
||||
b << data
|
||||
}
|
||||
|
||||
pub fn (mut b Builder) write_byte(data byte) {
|
||||
b << data
|
||||
pub fn (mut b Builder) clear() {
|
||||
b = []u8{cap: b.cap}
|
||||
}
|
||||
|
||||
pub fn (mut b Builder) write_u8(data u8) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue