- Sort Score
- Result 10 results
- Languages All
Results 1 - 1 of 1 for ExampleBuffer_Read (0.09 sec)
-
src/bytes/example_test.go
var b bytes.Buffer b.Grow(64) b.Write([]byte("abcde")) fmt.Printf("%s\n", b.Next(2)) fmt.Printf("%s\n", b.Next(2)) fmt.Printf("%s", b.Next(2)) // Output: // ab // cd // e } func ExampleBuffer_Read() { var b bytes.Buffer b.Grow(64) b.Write([]byte("abcde")) rdbuf := make([]byte, 1) n, err := b.Read(rdbuf) if err != nil { panic(err) } fmt.Println(n) fmt.Println(b.String())
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Wed Aug 07 17:22:36 UTC 2024 - 14.9K bytes - Viewed (0)