- Sort Score
- Result 10 results
- Languages All
Results 111 - 120 of 139 for myrunes (0.14 sec)
-
src/bufio/bufio_test.go
t.Errorf("#%d: got error %v; want EOF", rno, err) } } } // Test that UnreadRune fails if the preceding operation was not a ReadRune. func TestUnreadRuneError(t *testing.T) { buf := make([]byte, 3) // All runes in this test are 3 bytes long r := NewReader(&StringReader{data: []string{"日本語日本語日本語"}}) if r.UnreadRune() == nil { t.Error("expected error on UnreadRune from fresh buffer") } _, _, err := r.ReadRune()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Feb 10 18:56:01 UTC 2023 - 51.5K bytes - Viewed (0) -
src/strconv/quote.go
r, wid := utf8.DecodeRuneInString(s) s = s[wid:] if wid > 1 { if r == '\ufeff' { return false // BOMs are invisible and should not be quoted. } continue // All other multibyte runes are correctly encoded and assumed printable. } if r == utf8.RuneError { return false } if (r < ' ' && r != '\t') || r == '`' || r == '\u007F' { return false } } return true }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Apr 04 14:21:28 UTC 2024 - 16.5K bytes - Viewed (0) -
src/bytes/buffer_test.go
t.Fatalf("ReadRune(%U) after UnreadRune got %U,%d not %U,%d (err=%s)", r, r2, nbytes, r, size, err) } } } func TestWriteInvalidRune(t *testing.T) { // Invalid runes, including negative ones, should be written as // utf8.RuneError. for _, r := range []rune{-1, utf8.MaxRune + 1} { var buf Buffer buf.WriteRune(r)
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/go/internal/work/gc.go
if err != nil { return err } fi, err := src.Stat() if err != nil { src.Close() return err } // Note: Not using %-16.16s format because we care // about bytes, not runes. name := fi.Name() if len(name) > 16 { name = name[:16] } else { name += strings.Repeat(" ", 16-len(name)) } size := fi.Size() fmt.Fprintf(w, "%s%-12d%-6d%-6d%-8o%-10d`\n",
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Apr 18 15:37:44 UTC 2024 - 23K bytes - Viewed (0) -
src/regexp/exec_test.go
// RE2's \B considers every byte position, // so it sees 'not word boundary' in the // middle of UTF-8 sequences. This package // only considers the positions between runes, // so it disagrees. Skip those cases. continue } res := strings.Split(line, ";") if len(res) != len(run) { t.Fatalf("%s:%d: have %d test results, want %d", file, lineno, len(res), len(run))
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Mar 25 19:36:03 UTC 2024 - 20.7K bytes - Viewed (0) -
src/reflect/value.go
n := int((*arrayType)(unsafe.Pointer(v.typ())).Len) return unsafe.Slice(p, n) } panic(&ValueError{"reflect.Value.Bytes", v.kind()}) } // runes returns v's underlying value. // It panics if v's underlying value is not a slice of runes (int32s). func (v Value) runes() []rune { v.mustBe(Slice) if v.typ().Elem().Kind() != abi.Int32 { panic("reflect.Value.Bytes of non-rune slice") }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 22 21:17:41 UTC 2024 - 119.9K bytes - Viewed (0) -
src/go/scanner/scanner.go
offs := s.offset // Optimize for the common case of an ASCII identifier. // // Ranging over s.src[s.rdOffset:] lets us avoid some bounds checks, and // avoids conversions to runes. // // In case we encounter a non-ASCII character, fall back on the slower path // of calling into s.next(). for rdOffset, b := range s.src[s.rdOffset:] {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 12:02:03 UTC 2023 - 24.3K bytes - Viewed (0) -
src/bufio/bufio.go
} // WriteRune writes a single Unicode code point, returning // the number of bytes written and any error. func (b *Writer) WriteRune(r rune) (size int, err error) { // Compare as uint32 to correctly handle negative runes. if uint32(r) < utf8.RuneSelf { err = b.WriteByte(byte(r)) if err != nil { return 0, err } return 1, nil } if b.err != nil { return 0, b.err } n := b.Available()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 12 14:39:08 UTC 2023 - 21.8K bytes - Viewed (0) -
src/html/template/escape.go
i := bytes.IndexAny(s, delimEnds[c.delim]) if i == -1 { i = len(s) } if c.delim == delimSpaceOrTagEnd { // https://www.w3.org/TR/html5/syntax.html#attribute-value-(unquoted)-state // lists the runes below as error characters. // Error out because HTML parsers may differ on whether // "<a id= onclick=f(" ends inside id's or onclick's value, // "<a class=`foo " ends inside a value,
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Oct 02 15:18:39 UTC 2023 - 32.4K bytes - Viewed (0) -
src/go/internal/gccgoimporter/parser.go
} defer func(w uint64) { p.scanner.Whitespace = w }(p.scanner.Whitespace) p.scanner.Whitespace = 0 // We should now have p.tok pointing to the final newline. // The next runes from the scanner should be the type data. var sb strings.Builder for sb.Len() < total { r := p.scanner.Next() if r == scanner.EOF { p.error("unexpected EOF") } sb.WriteRune(r) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Feb 02 23:14:07 UTC 2024 - 31.2K bytes - Viewed (0)