21 lines
363 B
V
21 lines
363 B
V
module abcde
|
|
|
|
pub struct Builder {
|
|
pub mut:
|
|
// TODO
|
|
buf []byte
|
|
str_calls int
|
|
len int
|
|
initial_size int = 1
|
|
}
|
|
|
|
pub fn new_builder(initial_size int) Builder {
|
|
return Builder{
|
|
// buf: make(0, initial_size)
|
|
buf: []byte{cap: initial_size}
|
|
str_calls: 0 // after str_calls
|
|
len: 0 // after len
|
|
initial_size: initial_size // final
|
|
}
|
|
}
|