func allocBuffer(orig, cur string) *stringBuilder {
	output := &stringBuilder{}
	maxSize := len(orig) * 4
	if maxSize > bufferMaxInitGrowSize {
		maxSize = bufferMaxInitGrowSize
	}
	output.Grow(maxSize)
	output.WriteString(orig[:len(orig)-len(cur)])
	return output
}
Lazy initialize a buffer.
package xstrings
const bufferMaxInitGrowSize = 2048