Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for b2 (0.15 sec)

  1. src/bytes/compare_test.go

    	b1 := []byte("Hello Gophers!")
    	b2 := []byte("Hello Gophers!")
    	for i := 0; i < b.N; i++ {
    		if Compare(b1, b2) != 0 {
    			b.Fatal("b1 != b2")
    		}
    	}
    }
    
    func BenchmarkCompareBytesToNil(b *testing.B) {
    	b1 := []byte("Hello Gophers!")
    	var b2 []byte
    	for i := 0; i < b.N; i++ {
    		if Compare(b1, b2) != 1 {
    			b.Fatal("b1 > b2 failed")
    		}
    	}
    }
    
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Thu Jul 13 23:11:42 GMT 2023
    - 6.8K bytes
    - Viewed (0)
  2. src/bufio/bufio_test.go

    		if err = r.UnreadByte(); err != nil {
    			t.Fatal("unexpected error on UnreadByte:", err)
    		}
    		b2, err := r.ReadByte()
    		if err != nil {
    			t.Fatal("unexpected error reading after unreading:", err)
    		}
    		if b1 != b2 {
    			t.Fatalf("incorrect byte after unread: got %q, want %q", b1, b2)
    		}
    	}
    	if got != want {
    		t.Errorf("got %q, want %q", got, want)
    	}
    }
    
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Feb 10 18:56:01 GMT 2023
    - 51.5K bytes
    - Viewed (0)
  3. src/bytes/buffer.go

    	if c < 2*cap(b) {
    		// The growth rate has historically always been 2x. In the future,
    		// we could rely purely on append to determine the growth rate.
    		c = 2 * cap(b)
    	}
    	b2 := append([]byte(nil), make([]byte, c)...)
    	copy(b2, b)
    	return b2[:len(b)]
    }
    
    // WriteTo writes data to w until the buffer is drained or an error occurs.
    // The return value n is the number of bytes written; it always fits into an
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Oct 13 17:10:31 GMT 2023
    - 15.7K bytes
    - Viewed (0)
  4. src/archive/zip/reader.go

    	*b = (*b)[4:]
    	return v
    }
    
    func (b *readBuf) uint64() uint64 {
    	v := binary.LittleEndian.Uint64(*b)
    	*b = (*b)[8:]
    	return v
    }
    
    func (b *readBuf) sub(n int) readBuf {
    	b2 := (*b)[:n]
    	*b = (*b)[n:]
    	return b2
    }
    
    // A fileListEntry is a File and its ename.
    // If file == nil, the fileListEntry describes a directory without metadata.
    type fileListEntry struct {
    	name  string
    	file  *File
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Oct 13 18:36:46 GMT 2023
    - 27.7K bytes
    - Viewed (0)
  5. src/archive/zip/reader_test.go

    0000020 67 67 65 72 2e 7a 69 70 ec dc 6b 4c 53 67 18 07
    0000030 f0 16 c5 ca 65 2e cb b8 94 20 61 1f 44 33 c7 cd
    0000040 c0 86 4a b5 c0 62 8a 61 05 c6 cd 91 b2 54 8c 1b
    0000050 63 8b 03 9c 1b 95 52 5a e3 a0 19 6c b2 05 59 44
    0000060 64 9d 73 83 71 11 46 61 14 b9 1d 14 09 4a c3 60
    0000070 2e 4c 6e a5 60 45 02 62 81 95 b6 94 9e 9e 77 e7
    0000080 d0 43 b6 f8 71 df 96 3c e7 a4 69 ce bf cf e9 79
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Wed Mar 27 18:23:49 GMT 2024
    - 55.3K bytes
    - Viewed (0)
  6. doc/go1.17_spec.html

    </p>
    
    <pre>
    type (
    	A1 = string
    	A2 = A1
    )
    
    type (
    	B1 string
    	B2 B1
    	B3 []B1
    	B4 B3
    )
    </pre>
    
    <p>
    The underlying type of <code>string</code>, <code>A1</code>, <code>A2</code>, <code>B1</code>,
    and <code>B2</code> is <code>string</code>.
    The underlying type of <code>[]B1</code>, <code>B3</code>, and <code>B4</code> is <code>[]B1</code>.
    </p>
    
    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)
  7. doc/go_spec.html

    </p>
    
    <pre>
    type (
    	A1 = string
    	A2 = A1
    )
    
    type (
    	B1 string
    	B2 B1
    	B3 []B1
    	B4 B3
    )
    
    func f[P any](x P) { … }
    </pre>
    
    <p>
    The underlying type of <code>string</code>, <code>A1</code>, <code>A2</code>, <code>B1</code>,
    and <code>B2</code> is <code>string</code>.
    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