- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 25 for encoderFunc (0.26 sec)
-
staging/src/k8s.io/apiserver/pkg/endpoints/handlers/response.go
func (e *watchEncoder) Encode(event watch.Event) error { encodeFunc := func(obj runtime.Object, w io.Writer) error { return e.doEncode(obj, event, w) } if co, ok := event.Object.(runtime.CacheableObject); ok { return co.CacheEncode(e.identifier(event.Type), encodeFunc, e.framer) } return encodeFunc(event.Object, e.framer) }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Oct 18 09:07:03 UTC 2023 - 16.5K bytes - Viewed (0) -
src/html/template/css.go
// unicode ::= '\' [0-9a-fA-F]{1,6} wc? j := 2 for j < len(s) && j < 7 && isHex(s[j]) { j++ } r := hexDecode(s[1:j]) if r > unicode.MaxRune { r, j = r/16, j-1 } n := utf8.EncodeRune(b[len(b):cap(b)], r) // The optional space at the end allows a hex // sequence to be followed by a literal hex. // string(decodeCSS([]byte(`\A B`))) == "\nB" b, s = b[:len(b)+n], skipCSSSpace(s[j:]) } else {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 02 19:38:18 UTC 2023 - 7K bytes - Viewed (0) -
src/vendor/golang.org/x/text/unicode/bidi/prop.go
0x8: FSI, // U+2068 FirstStrongIsolate, 0x9: PDI, // U+2069 PopDirectionalIsolate, } // LookupRune returns properties for r. func LookupRune(r rune) (p Properties, size int) { var buf [4]byte n := utf8.EncodeRune(buf[:], r) return Lookup(buf[:n]) } // TODO: these lookup methods are based on the generated trie code. The returned // sizes have slightly different semantics from the generated code, in that it
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Mar 11 20:28:54 UTC 2019 - 5.7K bytes - Viewed (0) -
src/unicode/utf8/utf8.go
case r <= rune3Max: return 3 case r <= MaxRune: return 4 } return -1 } // EncodeRune writes into p (which must be large enough) the UTF-8 encoding of the rune. // If the rune is out of range, it writes the encoding of [RuneError]. // It returns the number of bytes written. func EncodeRune(p []byte, r rune) int { // Negative values are erroneous. Making it unsigned addresses the problem.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Mar 08 02:00:36 UTC 2024 - 16.4K bytes - Viewed (0) -
src/encoding/json/decode.go
// A valid pair; consume. r += 6 w += utf8.EncodeRune(b[w:], dec) break } // Invalid surrogate; fall back to replacement rune. rr = unicode.ReplacementChar } w += utf8.EncodeRune(b[w:], rr) } // Quote, control characters are invalid. case c == '"', c < ' ': return
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 00:18:55 UTC 2024 - 35.3K 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: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Apr 26 13:31:36 UTC 2024 - 18.6K bytes - Viewed (0) -
src/cmd/compile/internal/types2/typestring.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 03:01:18 UTC 2024 - 12.2K bytes - Viewed (0) -
src/go/types/typestring.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 03:01:18 UTC 2024 - 12.3K bytes - Viewed (0) -
src/fmt/format.go
// For %#U we want to add a space and a quoted character at the end of the buffer. if f.sharp && u <= utf8.MaxRune && strconv.IsPrint(rune(u)) { i-- buf[i] = '\'' i -= utf8.RuneLen(rune(u)) utf8.EncodeRune(buf[i:], rune(u)) i-- buf[i] = '\'' i-- buf[i] = ' ' } // Format the Unicode code point u as a hexadecimal number. for u >= 16 { i-- buf[i] = udigits[u&0xF] prec--
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Mar 04 17:31:55 UTC 2024 - 13.8K 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: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Feb 10 18:56:01 UTC 2023 - 51.5K bytes - Viewed (0)