- Sort Score
- Result 10 results
- Languages All
Results 1 - 8 of 8 for placement (0.63 sec)
-
src/bufio/scan.go
// means that erroneous UTF-8 encodings translate to U+FFFD = "\xef\xbf\xbd". // Because of the Scan interface, this makes it impossible for the client to // distinguish correctly encoded replacement runes from encoding errors. func ScanRunes(data []byte, atEOF bool) (advance int, token []byte, err error) { if atEOF && len(data) == 0 { return 0, nil, nil } // Fast path 1: ASCII.
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Mon Oct 23 09:06:30 GMT 2023 - 14.2K bytes - Viewed (0) -
src/bytes/bytes_test.go
{"InvalidASCII", []byte("foo\xffbar")}, {"InvalidNonASCII", []byte("日本語\xff日本語")}, } replacement := []byte("\uFFFD") b.ResetTimer() for _, test := range tests { b.Run(test.name, func(b *testing.B) { for i := 0; i < b.N; i++ { ToValidUTF8(test.input, replacement) } }) } } func makeBenchInputHard() []byte { tokens := [...]string{
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Wed Jan 24 16:07:25 GMT 2024 - 56.2K bytes - Viewed (0) -
src/bufio/bufio_test.go
// Invalid runes, including negative ones, should be written as the // replacement character. for _, r := range []rune{-1, utf8.MaxRune + 1} { var buf strings.Builder w := NewWriter(&buf) w.WriteRune(r) w.Flush() if s := buf.String(); s != "\uFFFD" { t.Errorf("WriteRune(%d) wrote %q, not replacement character", r, s) } } } func TestReadStringAllocs(t *testing.T) {
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Fri Feb 10 18:56:01 GMT 2023 - 51.5K bytes - Viewed (0) -
doc/go1.17_spec.html
and the second value, of type <code>rune</code>, will be the value of the corresponding code point. If the iteration encounters an invalid UTF-8 sequence, the second value will be <code>0xFFFD</code>, the Unicode replacement character, and the next iteration will advance a single byte in the string. </li> <li> The iteration order over maps is not specified and is not guaranteed to be the same from one iteration to the next.
HTML - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Thu Apr 11 20:22:45 GMT 2024 - 211.6K bytes - Viewed (0) -
src/archive/zip/writer_test.go
comment: "in the 世界", flags: 0x808, }, { name: "hi, こんにちわ", comment: "in the 世界", flags: 0x808, }, { name: "the replacement rune is �", comment: "the replacement rune is �", flags: 0x808, }, { // Name is Japanese encoded in Shift JIS. name: "\x93\xfa\x96{\x8c\xea.txt", comment: "in the 世界",
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) -
src/cmd/cgo/gcc.go
} // mangle replaces references to C names in arg with the mangled names, // rewriting calls when it finds them. // It removes the corresponding references in f.Ref and f.Calls, so that we // don't try to do the replacement again in rewriteRef or rewriteCall. // If addPosition is true, add position info to the idents of C names in arg. func (p *Package) mangle(f *File, arg *ast.Expr, addPosition bool) (ast.Expr, bool) { needsUnsafe := false
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Thu Nov 02 16:43:23 GMT 2023 - 97K bytes - Viewed (0) -
src/bytes/bytes.go
} // 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); { c := s[i] if c < utf8.RuneSelf { i++
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Mon Feb 19 19:51:15 GMT 2024 - 33.8K bytes - Viewed (0) -
doc/go_spec.html
and the second value, of type <code>rune</code>, will be the value of the corresponding code point. If the iteration encounters an invalid UTF-8 sequence, the second value will be <code>0xFFFD</code>, the Unicode replacement character, and the next iteration will advance a single byte in the string. </li> <li> The iteration order over maps is not specified and is not guaranteed to be the same from one iteration to the next.
HTML - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Fri Apr 26 00:39:16 GMT 2024 - 279.6K bytes - Viewed (0)