Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 23 for content_sv (0.2 sec)

  1. src/bytes/buffer_test.go

    	}
    
    	if string(bytes) != s {
    		t.Errorf("%s: string(buf.Bytes()) == %q, s == %q", testname, string(bytes), s)
    	}
    }
    
    // Fill buf through n writes of string fus.
    // The initial contents of buf corresponds to the string s;
    // the result is the final contents of buf returned as a string.
    func fillString(t *testing.T, testname string, buf *Buffer, s string, n int, fus string) string {
    	check(t, testname+" (fill 1)", buf, s)
    	for ; n > 0; n-- {
    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. src/cmd/cgo/doc.go

    ordinary Go string value. The string length, and a pointer to the
    string contents, may be accessed by calling the C functions
    
    	size_t _GoStringLen(_GoString_ s);
    	const char *_GoStringPtr(_GoString_ s);
    
    These functions are only available in the preamble, not in other C
    files. The C code must not modify the contents of the pointer returned
    by _GoStringPtr. Note that the string contents may not have a trailing
    NUL byte.
    
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Sun Mar 31 09:02:45 GMT 2024
    - 42.1K bytes
    - Viewed (0)
  3. src/archive/zip/reader_test.go

    			t.Errorf("%v: uncompressed size %#x, want %#x", ft.Name, size, ft.Size)
    		}
    		r.Close()
    		return
    	}
    
    	var b bytes.Buffer
    	_, err = io.Copy(&b, r)
    	if err != ft.ContentErr {
    		t.Errorf("copying contents: %v (want %v)", err, ft.ContentErr)
    	}
    	if err != nil {
    		return
    	}
    	r.Close()
    
    	if g := uint64(b.Len()); g != size {
    		t.Errorf("%v: read %v bytes but f.UncompressedSize == %v", f.Name, g, size)
    	}
    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)
  4. doc/go1.17_spec.html

    A string value is a (possibly empty) sequence of bytes.
    The number of bytes is called the length of the string and is never negative.
    Strings are immutable: once created,
    it is impossible to change the contents of a string.
    The predeclared string type is <code>string</code>;
    it is a <a href="#Type_definitions">defined type</a>.
    </p>
    
    <p>
    The length of a string <code>s</code> can be discovered using
    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)
  5. src/bytes/buffer.go

    const smallBufferSize = 64
    
    // A Buffer is a variable-sized buffer of bytes with [Buffer.Read] and [Buffer.Write] methods.
    // The zero value for Buffer is an empty buffer ready to use.
    type Buffer struct {
    	buf      []byte // contents are the bytes buf[off : len(buf)]
    	off      int    // read at &buf[off], write at &buf[len(buf)]
    	lastRead readOp // last read operation, so that Unread* can work correctly.
    }
    
    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)
  6. src/archive/zip/writer_test.go

    	want, err := os.ReadFile("testdata/time-go.zip")
    	if err != nil {
    		t.Fatalf("unexpected ReadFile error: %v", err)
    	}
    	if got := buf.Bytes(); !bytes.Equal(got, want) {
    		fmt.Printf("%x\n%x\n", got, want)
    		t.Error("contents of time-go.zip differ")
    	}
    }
    
    func TestWriterOffset(t *testing.T) {
    	largeData := make([]byte, 1<<17)
    	if _, err := rand.Read(largeData); err != nil {
    		t.Fatal("rand.Read failed:", err)
    	}
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Sep 15 19:04:06 GMT 2023
    - 14.1K bytes
    - Viewed (0)
  7. src/cmd/cgo/internal/test/issue1435.go

    //   pthread_mutex_unlock(&mu);
    //   for (i = 0; i < nts; i++) {
    //     pthread_join(t[i], NULL);
    //   }
    //   pthread_mutex_destroy(&mu);
    //   free(t);
    // }
    import "C"
    
    // compareStatus is used to confirm the contents of the thread
    // specific status files match expectations.
    func compareStatus(filter, expect string) error {
    	expected := filter + expect
    	pid := syscall.Getpid()
    	fs, err := os.ReadDir(fmt.Sprintf("/proc/%d/task", pid))
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Fri Jul 28 21:31:41 GMT 2023
    - 7.5K bytes
    - Viewed (0)
  8. src/archive/tar/common.go

    	// "SCHILY.xattr." namespace.
    	//
    	// The following are semantically equivalent:
    	//  h.Xattrs[key] = value
    	//  h.PAXRecords["SCHILY.xattr."+key] = value
    	//
    	// When Writer.WriteHeader is called, the contents of Xattrs will take
    	// precedence over those in PAXRecords.
    	//
    	// Deprecated: Use PAXRecords instead.
    	Xattrs map[string]string
    
    	// PAXRecords is a map of PAX extended header records.
    	//
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Mar 15 16:01:50 GMT 2024
    - 24.7K bytes
    - Viewed (2)
  9. src/cmd/cgo/gcc.go

    // it writes
    //
    //	_cgoIndexNN := &a
    //
    // and dereferences the uses of _cgoIndexNN. Taking the address avoids
    // making a copy of an array.
    //
    // This tells _cgoCheckPointer to check the complete contents of the
    // slice or array being indexed, but no other part of the memory allocation.
    func (p *Package) checkIndex(sb, sbCheck *bytes.Buffer, arg ast.Expr, i int) bool {
    	// Strip type conversions.
    	x := arg
    	for {
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Thu Nov 02 16:43:23 GMT 2023
    - 97K bytes
    - Viewed (0)
  10. src/archive/zip/reader.go

    	bodyOffset, err := f.findBodyOffset()
    	if err != nil {
    		return
    	}
    	return f.headerOffset + bodyOffset, nil
    }
    
    // Open returns a [ReadCloser] that provides access to the [File]'s contents.
    // Multiple files may be read concurrently.
    func (f *File) Open() (io.ReadCloser, error) {
    	bodyOffset, err := f.findBodyOffset()
    	if err != nil {
    		return nil, err
    	}
    	if strings.HasSuffix(f.Name, "/") {
    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)
Back to top