- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 167 for appendInt (0.32 sec)
-
src/strconv/itoa_test.go
s := FormatInt(test.in, test.base) if s != test.out { t.Errorf("FormatInt(%v, %v) = %v want %v", test.in, test.base, s, test.out) } x := AppendInt([]byte("abc"), test.in, test.base) if string(x) != "abc"+test.out { t.Errorf("AppendInt(%q, %v, %v) = %q want %v", "abc", test.in, test.base, x, test.out) } if test.in >= 0 { s := FormatUint(uint64(test.in), test.base) if s != test.out {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Sep 15 21:09:39 UTC 2022 - 5.8K bytes - Viewed (0) -
src/log/slog/internal/benchmarks/handlers.go
buf.WriteString(v.String()) case slog.KindInt64: *buf = strconv.AppendInt(*buf, v.Int64(), 10) case slog.KindUint64: *buf = strconv.AppendUint(*buf, v.Uint64(), 10) case slog.KindFloat64: *buf = strconv.AppendFloat(*buf, v.Float64(), 'g', -1, 64) case slog.KindBool: *buf = strconv.AppendBool(*buf, v.Bool()) case slog.KindDuration: *buf = strconv.AppendInt(*buf, v.Duration().Nanoseconds(), 10) case slog.KindTime:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Apr 12 20:33:37 UTC 2023 - 4.1K bytes - Viewed (0) -
src/time/format_rfc3339.go
year, month, day, _ := absDate(abs, true) b = appendInt(b, year, 4) b = append(b, '-') b = appendInt(b, int(month), 2) b = append(b, '-') b = appendInt(b, day, 2) b = append(b, 'T') // Format time. hour, min, sec := absClock(abs) b = appendInt(b, hour, 2) b = append(b, ':') b = appendInt(b, min, 2) b = append(b, ':') b = appendInt(b, sec, 2) if nanos {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Jan 18 19:59:26 UTC 2023 - 5.7K bytes - Viewed (0) -
test/fixedbugs/issue19359.go
if r := recover(); r != nil { err = fmt.Errorf("addStr failed: %v", r) } }() m[key] += "hello, go" return nil } func appendInt(m map[interface{}][]int, key interface{}) (err error) { defer func() { if r := recover(); r != nil { err = fmt.Errorf("appendInt failed: %v", r) } }() m[key] = append(m[key], 2018) return nil }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Mar 20 01:47:07 UTC 2018 - 1.9K bytes - Viewed (0) -
src/time/format.go
buf = append(buf, ", "...) buf = appendInt(buf, hour, 0) buf = append(buf, ", "...) buf = appendInt(buf, minute, 0) buf = append(buf, ", "...) buf = appendInt(buf, second, 0) buf = append(buf, ", "...) buf = appendInt(buf, t.Nanosecond(), 0) buf = append(buf, ", "...) switch loc := t.Location(); loc { case UTC, nil: buf = append(buf, "time.UTC"...) case Local:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jun 11 17:09:28 UTC 2024 - 49.3K bytes - Viewed (0) -
src/time/export_test.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Oct 24 19:23:32 UTC 2022 - 4K bytes - Viewed (0) -
src/strconv/strconv_test.go
mallocTest = []struct { count int desc string fn func() }{ {0, `AppendInt(localBuf[:0], 123, 10)`, func() { var localBuf [64]byte AppendInt(localBuf[:0], 123, 10) }}, {0, `AppendInt(globalBuf[:0], 123, 10)`, func() { AppendInt(globalBuf[:0], 123, 10) }}, {0, `AppendFloat(localBuf[:0], 1.23, 'g', 5, 64)`, func() { var localBuf [64]byte
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Aug 23 20:29:22 UTC 2022 - 4.7K bytes - Viewed (0) -
src/strconv/itoa.go
return s } // Itoa is equivalent to [FormatInt](int64(i), 10). func Itoa(i int) string { return FormatInt(int64(i), 10) } // AppendInt appends the string form of the integer i, // as generated by [FormatInt], to dst and returns the extended buffer. func AppendInt(dst []byte, i int64, base int) []byte { if fastSmalls && 0 <= i && i < nSmalls && base == 10 { return append(dst, small(int(i))...) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Apr 04 14:21:28 UTC 2024 - 5.3K bytes - Viewed (0) -
src/strconv/doc.go
// // s := strconv.FormatBool(true) // s := strconv.FormatFloat(3.1415, 'E', -1, 64) // s := strconv.FormatInt(-42, 16) // s := strconv.FormatUint(42, 16) // // [AppendBool], [AppendFloat], [AppendInt], and [AppendUint] are similar but // append the formatted value to a destination slice. // // # String Conversions // // [Quote] and [QuoteToASCII] convert strings to quoted Go string literals.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Apr 04 14:21:28 UTC 2024 - 1.9K bytes - Viewed (0) -
internal/grid/grid_types_msgp_test.go
o = msgp.AppendInt(o, z.OrgNum) // string "OrgString" o = append(o, 0xa9, 0x4f, 0x72, 0x67, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67) o = msgp.AppendString(o, z.OrgString) // string "Embedded" o = append(o, 0xa8, 0x45, 0x6d, 0x62, 0x65, 0x64, 0x64, 0x65, 0x64) // map header, size 2 // string "Num" o = append(o, 0x82, 0xa3, 0x4e, 0x75, 0x6d) o = msgp.AppendInt(o, z.Embedded.Num) // string "String"
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Tue Nov 21 01:09:35 UTC 2023 - 8.1K bytes - Viewed (0)