You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I propose adding functions Builder.Available and Builder.AvailableBuffer.
// AvailableBuffer returns an empty buffer with b.Available() capacity.func (b*Builder) AvailableBuffer() []byte// Available returns how many bytes are unused in the buffer.func (b*Builder) Available() int
In recent years, we have added many append-like APIs. It would be great if strings.Builder could benefit from it.
I propose adding functions Builder.Available and Builder.AvailableBuffer.
In recent years, we have added many append-like APIs. It would be great if strings.Builder could benefit from it.
One scenario I can think of is base64 encoding:
For example:
Bench:
The text was updated successfully, but these errors were encountered: