mirror of
https://github.com/golang/go
synced 2024-11-19 11:14:47 -07:00
bytes: mention strings.Builder in Buffer.String docs
Fixes #22778 Change-Id: I37f7a59c15828aa720fe787fff42fb3ef17729c7 Reviewed-on: https://go-review.googlesource.com/80815 Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
parent
a631daba5f
commit
ed8b7dedd3
@ -56,6 +56,8 @@ func (b *Buffer) Bytes() []byte { return b.buf[b.off:] }
|
||||
|
||||
// String returns the contents of the unread portion of the buffer
|
||||
// as a string. If the Buffer is a nil pointer, it returns "<nil>".
|
||||
//
|
||||
// To build strings more efficiently, see the strings.Builder type.
|
||||
func (b *Buffer) String() string {
|
||||
if b == nil {
|
||||
// Special case, useful in debugging.
|
||||
|
Loading…
Reference in New Issue
Block a user