Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for Append (0.16 sec)

  1. src/bytes/buffer_test.go

    	bb.Grow(16 << 20)
    	b.SetBytes(int64(bb.Available()))
    	b.ReportAllocs()
    	for i := 0; i < b.N; i++ {
    		bb.Reset()
    		b := bb.AvailableBuffer()
    		b = b[:cap(b)] // use max capacity to simulate a large append operation
    		bb.Write(b)    // should be nearly infinitely fast
    	}
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Apr 26 13:31:36 GMT 2024
    - 18.6K bytes
    - Viewed (0)
  2. doc/go_spec.html

    s3 := append(s2, s0...)            // append a slice              s3 is []int{0, 0, 2, 3, 5, 7, 0, 0}
    s4 := append(s3[3:6], s3[2:]...)   // append overlapping slice    s4 is []int{3, 5, 7, 2, 3, 5, 7, 0, 0}
    
    var t []interface{}
    t = append(t, 42, 3.1415, "foo")   //                             t is []interface{}{42, 3.1415, "foo"}
    
    var b []byte
    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)
Back to top