"io"
"os"
"sort"
+ "strconv"
"unicode"
)
// Output: hello world
}
+func ExampleBuffer_AvailableBuffer() {
+ var buf bytes.Buffer
+ for i := 0; i < 4; i++ {
+ b := buf.AvailableBuffer()
+ b = strconv.AppendInt(b, int64(i), 10)
+ b = append(b, ' ')
+ buf.Write(b)
+ }
+ os.Stdout.Write(buf.Bytes())
+ // Output: 0 1 2 3
+}
+
func ExampleBuffer_Cap() {
buf1 := bytes.NewBuffer(make([]byte, 10))
buf2 := bytes.NewBuffer(make([]byte, 0, 10))