- Sort Score
- Result 10 results
- Languages All
Results 1 - 1 of 1 for ExampleClone (0.05 sec)
-
src/bytes/example_test.go
b.Grow(64) b.Write([]byte("abcde")) c, err := b.ReadByte() if err != nil { panic(err) } fmt.Println(c) fmt.Println(b.String()) // Output: // 97 // bcde } func ExampleClone() { b := []byte("abc") clone := bytes.Clone(b) fmt.Printf("%s\n", clone) clone[0] = 'd' fmt.Printf("%s\n", b) fmt.Printf("%s\n", clone) // Output: // abc // abc // dbc }
Registered: Tue Sep 09 11:13:09 UTC 2025 - Last Modified: Mon May 12 16:07:54 UTC 2025 - 16.5K bytes - Viewed (0)