- Sort Score
- Result 10 results
- Languages All
Results 1 - 8 of 8 for UTF8 (0.13 sec)
-
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 {
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
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) -
src/bytes/bytes.go
// It returns -1 if rune is not present in s. // If r is utf8.RuneError, it returns the first instance of any // invalid UTF-8 byte sequence. func IndexRune(s []byte, r rune) int { switch { case 0 <= r && r < utf8.RuneSelf: return IndexByte(s, byte(r)) case r == utf8.RuneError: for i := 0; i < len(s); { r1, n := utf8.DecodeRune(s[i:]) if r1 == utf8.RuneError { return i } i += n }
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) -
src/bytes/bytes_test.go
{"\u0250\u0250\u0250\u0250\u0250", []byte("\u2C6F\u2C6F\u2C6F\u2C6F\u2C6F")}, // grows one byte per char {"a\u0080\U0010FFFF", []byte("A\u0080\U0010FFFF")}, // test utf8.RuneSelf and utf8.MaxRune } var lowerTests = []StringTest{ {"", []byte("")}, {"abc", []byte("abc")}, {"AbC123", []byte("abc123")}, {"azAZ09_", []byte("azaz09_")},
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/cmd/asm/internal/asm/parse.go
case scanner.Int: return p.atoi(tok.String()) case scanner.Char: str, err := strconv.Unquote(tok.String()) if err != nil { p.errorf("%s", err) } r, w := utf8.DecodeRuneInString(str) if w == 1 && r == utf8.RuneError { p.errorf("illegal UTF-8 encoding for character constant") } return uint64(r) case '+': return +p.factor() case '-': return -p.factor() case '~':
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Wed Feb 21 14:34:57 GMT 2024 - 36.9K bytes - Viewed (0) -
src/archive/zip/writer.go
// // Forbid 0x7e and 0x5c since EUC-KR and Shift-JIS replace those // characters with localized currency and overline characters. if r < 0x20 || r > 0x7d || r == 0x5c { if !utf8.ValidRune(r) || (r == utf8.RuneError && size == 1) { return false, false } require = true } } return true, require } // prepare performs the bookkeeping operations required at the start of
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Thu Apr 04 14:28:57 GMT 2024 - 19.3K bytes - Viewed (0) -
doc/go_spec.html
The <a href="/pkg/cmd/vet"><code>go vet</code></a> tool flags certain 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>
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) -
src/archive/tar/writer_test.go
Name: "file4", ModTime: time.Unix(1400000000, 0), PAXRecords: map[string]string{"mtime": "1400000000"}, }, nil}, testClose{nil}, }, }, { file: "testdata/gnu-utf8.tar", tests: []testFnc{ testHeader{Header{ Typeflag: TypeReg, Name: "☺☻☹☺☻☹☺☻☹☺☻☹☺☻☹☺☻☹☺☻☹☺☻☹☺☻☹☺☻☹☺☻☹☺☻☹☺☻☹☺☻☹☺☻☹☺☻☹☺☻☹☺☻☹", Mode: 0644, Uid: 1000, Gid: 1000, Uname: "☺",
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Tue Feb 27 16:39:23 GMT 2024 - 38.7K bytes - Viewed (0)