- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 10 for decoderune (0.19 sec)
-
src/bytes/iter.go
} } return } } // explodeSeq returns an iterator over the runes in s. 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).
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Wed Aug 14 18:23:13 UTC 2024 - 3.7K bytes - Viewed (0) -
src/bytes/bytes.go
var sr, tr rune if s[0] < utf8.RuneSelf { sr, s = rune(s[0]), s[1:] } else { r, size := utf8.DecodeRune(s) sr, s = r, s[size:] } if t[0] < utf8.RuneSelf { tr, t = rune(t[0]), t[1:] } else { r, size := utf8.DecodeRune(t) tr, t = r, t[size:] } // If they match, keep going; if not, return false. // Easy case. if tr == sr {
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Tue Sep 03 20:55:15 UTC 2024 - 35.6K bytes - Viewed (0) -
internal/s3select/jstream/decoder.go
d.scratch.addRune(r) goto scan_esc } r2 := d.u4() if r2 < 0 { return "", d.mkError(ErrSyntax, "in unicode escape sequence") } // write surrogate pair d.scratch.addRune(utf16.DecodeRune(r, r2)) c = d.next() goto scan } // u4 reads four bytes following a \u escape func (d *Decoder) u4() rune { // logic taken from: // github.com/buger/jsonparser/blob/master/escape.go#L20
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Sep 23 19:35:41 UTC 2024 - 13.5K bytes - Viewed (0) -
src/bytes/buffer.go
b.Reset() return 0, 0, io.EOF } c := b.buf[b.off] if c < utf8.RuneSelf { b.off++ b.lastRead = opReadRune1 return rune(c), 1, nil } r, n := utf8.DecodeRune(b.buf[b.off:]) b.off += n b.lastRead = readOp(n) return r, n, nil } // UnreadRune unreads the last rune returned by [Buffer.ReadRune]. // If the most recent read or write operation on the buffer was
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Tue Oct 29 16:47:05 UTC 2024 - 15.7K bytes - Viewed (0) -
cmd/iam-store.go
store.loadMappedPolicy(context.TODO(), user, stsUser, false, stsMap) decodeUser := user if decodeFunc != nil { decodeUser = decodeFunc(user) } blankEntities := madmin.UserPolicyEntities{User: decodeUser} if !groupSet.IsEmpty() { blankEntities.MemberOfMappings = store.listGroupPolicyMappings(cache, groupSet, nil, decodeFunc) } resMap[user] = blankEntities } var r []madmin.UserPolicyEntities
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Oct 14 16:35:37 UTC 2024 - 83.2K bytes - Viewed (0) -
internal/s3select/jstream/scratch.go
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Sep 23 19:35:41 UTC 2024 - 758 bytes - Viewed (0) -
src/bytes/buffer_test.go
func TestRuneIO(t *testing.T) { const NRune = 1000 // Built a test slice while we write the data b := make([]byte, utf8.UTFMax*NRune) var buf Buffer n := 0 for r := rune(0); r < NRune; r++ { size := utf8.EncodeRune(b[n:], r) nbytes, err := buf.WriteRune(r) if err != nil { t.Fatalf("WriteRune(%U) error: %s", r, err) } if nbytes != size { t.Fatalf("WriteRune(%U) expected %d, got %d", r, size, nbytes) }
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Tue Sep 03 20:55:15 UTC 2024 - 18.6K bytes - Viewed (0) -
src/bufio/bufio_test.go
const NRune = 1000 byteBuf := new(bytes.Buffer) w := NewWriter(byteBuf) // Write the runes out using WriteRune buf := make([]byte, utf8.UTFMax) for r := rune(0); r < NRune; r++ { size := utf8.EncodeRune(buf, r) nbytes, err := w.WriteRune(r) if err != nil { t.Fatalf("WriteRune(0x%x) error: %s", r, err) } if nbytes != size { t.Fatalf("WriteRune(0x%x) expected %d, got %d", r, size, nbytes) }
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Fri Nov 01 21:52:12 UTC 2024 - 51.6K bytes - Viewed (0) -
src/bytes/bytes_test.go
} } buf[n-1] = '\x00' } } func bmIndexRune(index func([]byte, rune) int) func(b *testing.B, n int) { return func(b *testing.B, n int) { buf := bmbuf[0:n] utf8.EncodeRune(buf[n-3:], '世') for i := 0; i < b.N; i++ { j := index(buf, '世') if j != n-3 { b.Fatal("bad index", j) } } buf[n-3] = '\x00' buf[n-2] = '\x00' buf[n-1] = '\x00' } }
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Mon Aug 19 19:09:04 UTC 2024 - 61.2K bytes - Viewed (0) -
doc/go_spec.html
integer-to-string conversions as potential errors. Library functions such as <a href="/pkg/unicode/utf8#AppendRune"><code>utf8.AppendRune</code></a> or <a href="/pkg/unicode/utf8#EncodeRune"><code>utf8.EncodeRune</code></a> should be used instead. </li> </ol> <h4 id="Conversions_from_slice_to_array_or_array_pointer">Conversions from slice to array or array pointer</h4> <p>
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Wed Oct 02 00:58:01 UTC 2024 - 282.5K bytes - Viewed (0)