Documentation ¶
Overview ¶
Package strbuilder defines a string builder type that allocates less than the standard library's strings.Builder by using a sync.Pool, so it doesn't matter if the compiler can't prove that the builder doesn't escape into the fmt package, etc.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
func (*Builder) Grow ¶
Grow grows the buffer's capacity, if necessary, to guarantee space for another n bytes. After Grow(n), at least n bytes can be written to the buffer without another allocation. If n is negative, Grow will panic. If the buffer can't grow it will panic with ErrTooLarge.
Click to show internal directories.
Click to hide internal directories.