Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for str (0.12 sec)

  1. src/bytes/buffer_test.go

    func check(t *testing.T, testname string, buf *Buffer, s string) {
    	bytes := buf.Bytes()
    	str := buf.String()
    	if buf.Len() != len(bytes) {
    		t.Errorf("%s: buf.Len() == %d, len(buf.Bytes()) == %d", testname, buf.Len(), len(bytes))
    	}
    
    	if buf.Len() != len(str) {
    		t.Errorf("%s: buf.Len() == %d, len(buf.String()) == %d", testname, buf.Len(), len(str))
    	}
    
    	if buf.Len() != len(s) {
    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

    The non-blank variable names on the left side of <code>:=</code>
    must be <a href="#Uniqueness_of_identifiers">unique</a>.
    </p>
    
    <pre>
    field1, offset := nextField(str, 0)
    field2, offset := nextField(str, offset)  // redeclares offset
    x, y, x := 1, 2, 3                        // illegal: x repeated on left side of :=
    </pre>
    
    <p>
    Short variable declarations may appear only inside functions.
    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