- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 740 for byte (0.04 sec)
-
src/bytes/bytes.go
return Map(c.ToTitle, s) } // ToValidUTF8 treats s as UTF-8-encoded bytes and returns a copy with each run of bytes // representing invalid UTF-8 replaced with the bytes in replacement, which may be empty. func ToValidUTF8(s, replacement []byte) []byte { b := make([]byte, 0, len(s)+len(replacement)) invalid := false // previous byte was from an invalid UTF-8 sequence for i := 0; i < len(s); {
Registered: Tue Oct 29 11:13:09 UTC 2024 - Last Modified: Tue Sep 03 20:55:15 UTC 2024 - 35.6K bytes - Viewed (0) -
src/bytes/bytes_test.go
{"TrimRight", []byte("☺"), "☺", []byte{}}, {"TrimPrefix", nil, "", nil}, {"TrimPrefix", []byte{}, "", []byte{}}, {"TrimPrefix", []byte{'a'}, "a", []byte{}}, {"TrimPrefix", []byte("☺"), "☺", []byte{}}, {"TrimSuffix", nil, "", nil}, {"TrimSuffix", []byte{}, "", []byte{}}, {"TrimSuffix", []byte{'a'}, "a", []byte{}}, {"TrimSuffix", []byte("☺"), "☺", []byte{}}, }
Registered: Tue Oct 29 11:13:09 UTC 2024 - Last Modified: Mon Aug 19 19:09:04 UTC 2024 - 61.2K bytes - Viewed (0) -
src/archive/tar/format.go
*b = block{} } type headerV7 [blockSize]byte func (h *headerV7) name() []byte { return h[000:][:100] } func (h *headerV7) mode() []byte { return h[100:][:8] } func (h *headerV7) uid() []byte { return h[108:][:8] } func (h *headerV7) gid() []byte { return h[116:][:8] } func (h *headerV7) size() []byte { return h[124:][:12] } func (h *headerV7) modTime() []byte { return h[136:][:12] }
Registered: Tue Oct 29 11:13:09 UTC 2024 - Last Modified: Fri Oct 13 18:36:46 UTC 2023 - 11.3K bytes - Viewed (0) -
docs/debugging/inspect/export.go
func checkXL2V1(buf []byte) (payload []byte, major, minor uint16, e error) { if len(buf) <= 8 { return payload, 0, 0, fmt.Errorf("xlMeta: no data") } if !bytes.Equal(buf[:4], xlHeader[:]) { return payload, 0, 0, fmt.Errorf("xlMeta: unknown XLv2 header, expected %v, got %v", xlHeader[:4], buf[:4]) } if bytes.Equal(buf[4:8], []byte("1 ")) { // Set as 1,0. major, minor = 1, 0
Registered: Sun Oct 27 19:28:09 UTC 2024 - Last Modified: Tue Nov 08 15:58:02 UTC 2022 - 9.1K bytes - Viewed (0) -
src/bytes/buffer_test.go
func init() { testBytes = make([]byte, N) for i := 0; i < N; i++ { testBytes[i] = 'a' + byte(i%26) } testString = string(testBytes) } // Verify that contents of buf match the string s. func check(t *testing.T, testname string, buf *Buffer, s string) { bytes := buf.Bytes() str := buf.String() if buf.Len() != len(bytes) {
Registered: Tue Oct 29 11:13:09 UTC 2024 - Last Modified: Tue Sep 03 20:55:15 UTC 2024 - 18.6K bytes - Viewed (0) -
src/bufio/bufio_test.go
if n := len(eofR.buf); n != 0 { t.Fatalf("got %d bytes left in bufio.Reader source; want 0 bytes", n) } // To prove the point, check that there are still 5 bytes available to read. if n := r.Buffered(); n != 5 { t.Fatalf("got %d bytes buffered in bufio.Reader; want 5 bytes", n) } // This is the second read of 0 bytes. read, err = r.Read([]byte{}) if err != nil { t.Fatalf("unexpected error: %v", err)
Registered: Tue Oct 29 11:13:09 UTC 2024 - Last Modified: Mon Oct 28 21:04:51 UTC 2024 - 51.6K bytes - Viewed (0) -
internal/crypto/key_test.go
}{ { SealExtKey: [32]byte{}, SealIV: [32]byte{}, SealDomain: "SSE-C", SealBucket: "bucket", SealObject: "object", UnsealExtKey: [32]byte{}, UnsealDomain: "SSE-C", UnsealBucket: "bucket", UnsealObject: "object", ShouldPass: true, }, // 0 { SealExtKey: [32]byte{}, SealIV: [32]byte{}, SealDomain: "SSE-C", SealBucket: "bucket", SealObject: "object",
Registered: Sun Oct 27 19:28:09 UTC 2024 - Last Modified: Fri Jul 12 20:51:54 UTC 2024 - 6.7K bytes - Viewed (0) -
internal/ioutil/ioutil_test.go
src io.Reader skipLen int64 expected string }{ {bytes.NewBuffer([]byte("")), 0, ""}, {bytes.NewBuffer([]byte("")), 1, ""}, {bytes.NewBuffer([]byte("abc")), 0, "abc"}, {bytes.NewBuffer([]byte("abc")), 1, "bc"}, {bytes.NewBuffer([]byte("abc")), 2, "c"}, {bytes.NewBuffer([]byte("abc")), 3, ""}, {bytes.NewBuffer([]byte("abc")), 4, ""}, } for i, testCase := range testCases {
Registered: Sun Oct 27 19:28:09 UTC 2024 - Last Modified: Wed May 22 23:07:14 UTC 2024 - 5.5K bytes - Viewed (0) -
internal/s3select/jstream/scanner_test.go
package jstream import ( "bufio" "bytes" "fmt" "io" "sync/atomic" "testing" ) var ( smallInput = make([]byte, 1024*12) // 12K mediumInput = make([]byte, 1024*1024*12) // 12MB largeInput = make([]byte, 1024*1024*128) // 128MB ) func TestScanner(t *testing.T) { data := []byte("abcdefghijklmnopqrstuvwxyz0123456789") var i int r := bytes.NewReader(data) scanner := newScanner(r)
Registered: Sun Oct 27 19:28:09 UTC 2024 - Last Modified: Mon Sep 23 19:35:41 UTC 2024 - 3.2K bytes - Viewed (0) -
src/bytes/iter.go
func explodeSeq(s []byte) iter.Seq[[]byte] { return func(yield func([]byte) bool) { for len(s) > 0 { _, size := utf8.DecodeRune(s) if !yield(s[:size:size]) { return } s = s[size:] } } } // splitSeq is SplitSeq or SplitAfterSeq, configured by how many // bytes of sep to include in the results (none or all). func splitSeq(s, sep []byte, sepSave int) iter.Seq[[]byte] { if len(sep) == 0 {
Registered: Tue Oct 29 11:13:09 UTC 2024 - Last Modified: Wed Aug 14 18:23:13 UTC 2024 - 3.7K bytes - Viewed (0)