- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 13 for Len (0.12 sec)
-
src/bytes/buffer_test.go
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) { t.Errorf("%s: buf.Len() == %d, len(s) == %d", testname, buf.Len(), len(s)) } if string(bytes) != 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) -
src/archive/zip/reader_test.go
} r.Close() if g := uint64(b.Len()); g != size { t.Errorf("%v: read %v bytes but f.UncompressedSize == %v", f.Name, g, size) } var c []byte if ft.Content != nil { c = ft.Content } else if c, err = os.ReadFile("testdata/" + ft.File); err != nil { t.Error(err) return } if b.Len() != len(c) { t.Errorf("%s: len=%d, want %d", f.Name, b.Len(), len(c)) return }
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) -
doc/go1.17_spec.html
and whose length and capacity are <code>len</code>. <code>Slice(ptr, len)</code> is equivalent to </p> <pre> (*[len]ArbitraryType)(unsafe.Pointer(ptr))[:] </pre> <p> except that, as a special case, if <code>ptr</code> is <code>nil</code> and <code>len</code> is zero, <code>Slice</code> returns <code>nil</code>. </p> <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) -
src/archive/zip/zip_test.go
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Wed Mar 27 18:23:49 GMT 2024 - 19.5K bytes - Viewed (0) -
src/archive/tar/common.go
ustar := blk.toUSTAR() gnu := blk.toGNU() verifyString(h.Name, len(v7.name()), "Name", paxPath) verifyString(h.Linkname, len(v7.linkName()), "Linkname", paxLinkpath) verifyString(h.Uname, len(ustar.userName()), "Uname", paxUname) verifyString(h.Gname, len(ustar.groupName()), "Gname", paxGname) verifyNumeric(h.Mode, len(v7.mode()), "Mode", paxNone) verifyNumeric(int64(h.Uid), len(v7.uid()), "Uid", paxUid)
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) -
doc/next/6-stdlib/99-minor/reflect/61308.md
The [SliceAt(typ Type, p unsafe.Pointer, len int)] function returns a Value representing a slice whose underlying array starts
Plain Text - Registered: Tue May 07 11:14:38 GMT 2024 - Last Modified: Fri Apr 12 20:57:18 GMT 2024 - 170 bytes - Viewed (0) -
src/builtin/builtin.go
// returns the number of elements copied, which will be the minimum of // len(src) and len(dst). func copy(dst, src []Type) int // The delete built-in function deletes the element with the specified key // (m[key]) from the map. If m is nil or there is no such element, delete // is a no-op. func delete(m map[Type]Type1, key Type) // The len built-in function returns the length of v, according to its type: //
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Thu Apr 11 20:22:45 GMT 2024 - 12.7K bytes - Viewed (0) -
doc/go_spec.html
a2 := [2]byte(s) // a2[0] == s[0] a4 := [4]byte(s) // panics: len([4]byte) > len(s) s0 := (*[0]byte)(s) // s0 != nil s1 := (*[1]byte)(s[1:]) // &s1[0] == &s[1] s2 := (*[2]byte)(s) // &s2[0] == &s[0] s4 := (*[4]byte)(s) // panics: len([4]byte) > len(s) var t []string t0 := [0]string(t) // ok for nil slice t
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) -
doc/next/6-stdlib/1-time.md
prepared before that call will be sent or received after the call. Earlier versions of Go used channels with a one-element buffer, making it difficult to use `Reset` and `Stop` correctly. A visible effect of this change is that `len` and `cap` of timer channels now returns 0 instead of 1, which may affect programs that poll the length to decide whether a receive on the timer channel will succeed. Such code should use a non-blocking receive instead.
Plain Text - Registered: Tue May 07 11:14:38 GMT 2024 - Last Modified: Fri Apr 12 20:57:18 GMT 2024 - 1.5K bytes - Viewed (0) -
src/archive/tar/reader.go
} else { // In a hole fragment bf := b[:min(int64(len(b)), holeEnd-sr.pos)] nf, err = tryReadFull(zeroReader{}, bf) } b = b[nf:] sr.pos += int64(nf) if sr.pos >= holeEnd && len(sr.sp) > 1 { sr.sp = sr.sp[1:] // Ensure last fragment always remains } } n = len(b0) - len(b) switch { case err == io.EOF: return n, errMissData // Less data in dense file than sparse file
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Fri Mar 08 01:59:14 GMT 2024 - 26.8K bytes - Viewed (0)