- Sort Score
- Result 10 results
- Languages All
Results 31 - 40 of 51 for maxRune (0.19 sec)
-
src/internal/fuzz/encoding.go
// Although rune and int32 are represented by the same type, only a subset // of valid int32 values can be expressed as rune literals. Notably, // negative numbers, surrogate halves, and values above unicode.MaxRune // have no quoted representation. // // fmt with "%q" (and the corresponding functions in the strconv package) // would quote out-of-range values to the Unicode replacement character
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Sep 30 16:39:12 UTC 2022 - 11K bytes - Viewed (0) -
src/cmd/compile/internal/typecheck/const.go
return constant.MakeUnknown() } func tostr(v constant.Value) constant.Value { if v.Kind() == constant.Int { r := unicode.ReplacementChar if x, ok := constant.Uint64Val(v); ok && x <= unicode.MaxRune { r = rune(x) } v = constant.MakeString(string(r)) } return v } func makeFloat64(f float64) constant.Value { if math.IsInf(f, 0) { base.Fatalf("infinity is not a valid constant")
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 05 15:20:28 UTC 2023 - 10.5K bytes - Viewed (0) -
src/cmd/vendor/rsc.io/markdown/html.go
j++ } if j-i < 1 || j-i > 7 || j >= len(s) || s[j] != ';' { return nil, 0, 0, false } r, _ = strconv.Atoi(s[i:j]) end = j + 1 } if r > unicode.MaxRune || r == 0 { r = unicode.ReplacementChar } return &Plain{string(rune(r))}, start, end, true } // Max name in list is 32 bytes. Try for 64 for good measure.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Jan 24 13:01:26 UTC 2024 - 11.9K bytes - Viewed (0) -
src/go/scanner/scanner.go
n, base, max = 3, 8, 255 case 'x': s.next() n, base, max = 2, 16, 255 case 'u': s.next() n, base, max = 4, 16, unicode.MaxRune case 'U': s.next() n, base, max = 8, 16, unicode.MaxRune default: msg := "unknown escape sequence" if s.ch < 0 { msg = "escape sequence not terminated" } s.error(offs, msg) return false }
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/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) { b := []byte{0, 1, 2, 3, 4}
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/vendor/github.com/ianlancetaylor/demangle/rust.go
k := 0 for delta > ((base-tmin)*tmax)/2 { delta /= base - tmin k += base } bias = k + ((base-tmin+1)*delta)/(delta+skew) n += i / (len(output) + 1) if n > utf8.MaxRune { rst.fail("punycode rune overflow") } else if !utf8.ValidRune(rune(n)) { rst.fail("punycode invalid code point") } i %= len(output) + 1 output = append(output, 0) copy(output[i+1:], output[i:])
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Aug 15 16:39:48 UTC 2023 - 23.3K bytes - Viewed (0) -
src/cmd/compile/internal/ir/fmt.go
return } typ := n.Type() val := n.Val() // Special case for rune constants. if typ == types.RuneType || typ == types.UntypedRune { if x, ok := constant.Uint64Val(val); ok && x <= utf8.MaxRune { fmt.Fprintf(s, "%q", x) return } } // Only include typ if it's neither the default nor untyped type // for the constant value.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 05 15:20:28 UTC 2023 - 26K bytes - Viewed (0) -
src/encoding/xml/xml_test.go
} if synerr.Msg != tt.err { t.Fatalf("input %d synerr.Msg wrong: want %q, got %q", i, tt.err, synerr.Msg) } } } func TestIsInCharacterRange(t *testing.T) { invalid := []rune{ utf8.MaxRune + 1, 0xD800, // surrogate min 0xDFFF, // surrogate max -1, } for _, r := range invalid { if isInCharacterRange(r) { t.Errorf("rune %U considered valid", r) } } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Mar 26 19:58:28 UTC 2024 - 36.9K bytes - Viewed (0) -
src/encoding/xml/xml.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Mar 08 18:46:41 UTC 2024 - 47.3K bytes - Viewed (0) -
src/bufio/bufio_test.go
} } } func TestWriteInvalidRune(t *testing.T) { // 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) } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Feb 10 18:56:01 UTC 2023 - 51.5K bytes - Viewed (0)