- Sort Score
- Result 10 results
- Languages All
Results 1 - 8 of 8 for Clone (0.13 sec)
-
src/bytes/example_test.go
} 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 } func ExampleCompare() { // Interpret Compare's result by comparing it to zero. var a, b []byte
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Mon Mar 04 15:54:40 GMT 2024 - 15K bytes - Viewed (1) -
src/bytes/bytes_test.go
var cloneTests = [][]byte{ []byte(nil), []byte{}, Clone([]byte{}), []byte(strings.Repeat("a", 42))[:0], []byte(strings.Repeat("a", 42))[:0:0], []byte("short"), []byte(strings.Repeat("a", 42)), } for _, input := range cloneTests { clone := Clone(input) if !Equal(clone, input) { t.Errorf("Clone(%q) = %q; want %q", input, clone, input) } if input == nil && clone != nil {
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Wed Jan 24 16:07:25 GMT 2024 - 56.2K bytes - Viewed (0) -
src/cmd/api/testdata/src/pkg/p4/golden.txt
Plain Text - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Fri Jan 26 19:39:32 GMT 2024 - 329 bytes - Viewed (0) -
src/bytes/bytes.go
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Mon Feb 19 19:51:15 GMT 2024 - 33.8K bytes - Viewed (0) -
doc/go1.17_spec.html
value of type <code>uint</code>. If the left operand of a non-constant shift expression is an untyped constant, it is first implicitly converted to the type it would assume if the shift expression were replaced by its left operand alone. </p> <pre> var a [1024]byte var s uint = 33 // The results of the following examples are given for 64-bit ints. var i = 1<<s // 1 has type int
HTML - Registered: Tue May 07 11:14:38 GMT 2024 - Last Modified: Thu Apr 11 20:22:45 GMT 2024 - 211.6K bytes - Viewed (0) -
api/go1.21.txt
pkg log/slog, method (*Record) AddAttrs(...Attr) #56345 pkg log/slog, method (*Record) Add(...interface{}) #56345 pkg log/slog, method (Record) Attrs(func(Attr) bool) #59060 pkg log/slog, method (Record) Clone() Record #56345 pkg log/slog, method (Record) NumAttrs() int #56345 pkg log/slog, method (*TextHandler) Enabled(context.Context, Level) bool #56345 pkg log/slog, method (*TextHandler) Handle(context.Context, Record) error #56345
Plain Text - Registered: Tue May 07 11:14:38 GMT 2024 - Last Modified: Mon Aug 07 09:39:17 GMT 2023 - 25.6K bytes - Viewed (0) -
src/bufio/bufio.go
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Thu Oct 12 14:39:08 GMT 2023 - 21.8K bytes - Viewed (0) -
doc/go_spec.html
value of type <code>uint</code>. If the left operand of a non-constant shift expression is an untyped constant, it is first implicitly converted to the type it would assume if the shift expression were replaced by its left operand alone. </p> <pre> var a [1024]byte var s uint = 33 // The results of the following examples are given for 64-bit ints. var i = 1<<s // 1 has type int
HTML - Registered: Tue May 07 11:14:38 GMT 2024 - Last Modified: Thu May 02 22:43:51 GMT 2024 - 279.6K bytes - Viewed (0)