Truncate resets the Builder to be empty, but unlike Reset, it retains the storage returned by Bytes.
()
| 25 | // Truncate resets the Builder to be empty, but unlike Reset, it retains the |
| 26 | // storage returned by Bytes. |
| 27 | func (b *Builder) Truncate() { |
| 28 | b.bytes = b.bytes[:0] |
| 29 | b.containers = b.containers[:0] |
| 30 | } |
| 31 | |
| 32 | // Grow guarantees that at least n bytes can be added to the Builder's |
| 33 | // underlying buffer without another allocation. |
no outgoing calls
no test coverage detected