- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for RuneError (0.09 sec)
-
src/bytes/bytes.go
if r >= utf8.RuneSelf { // search utf8.RuneError. for _, r = range chars { if r == utf8.RuneError { return 0 } } return -1 } if bytealg.IndexByteString(chars, s[0]) >= 0 { return 0 } return -1 } if len(chars) == 1 { r := rune(chars[0]) if r >= utf8.RuneSelf { r = utf8.RuneError } return IndexRune(s, r) } if len(s) > 8 {
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Tue Sep 03 20:55:15 UTC 2024 - 35.6K 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
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Mon Sep 23 14:32:33 UTC 2024 - 19.4K bytes - Viewed (0) -
src/bytes/buffer_test.go
} } } 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) check(t, fmt.Sprintf("TestWriteInvalidRune (%d)", r), &buf, "\uFFFD") } } func TestNext(t *testing.T) {
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/cmd/asm/internal/asm/parse.go
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 '~': return ^p.factor()
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Wed Sep 04 18:16:59 UTC 2024 - 36.9K bytes - Viewed (0)