- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 133 for atoi32 (0.15 sec)
-
src/strconv/atoi.go
return -int64(cutoff), rangeError(fnParseInt, s0) } n := int64(un) if neg { n = -n } return n, nil } // Atoi is equivalent to ParseInt(s, 10, 0), converted to type int. func Atoi(s string) (int, error) { const fnAtoi = "Atoi" sLen := len(s) if intSize == 32 && (0 < sLen && sLen < 10) || intSize == 64 && (0 < sLen && sLen < 19) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sun May 05 00:24:26 UTC 2024 - 8.3K bytes - Viewed (0) -
src/strconv/fp_test.go
// itself, passes the rest on to strconv.ParseFloat. func myatof32(s string) (f float32, ok bool) { if mant, exp, ok := strings.Cut(s, "p"); ok { n, err := strconv.Atoi(mant) if err != nil { println("bad n", mant) return 0, false } e, err1 := strconv.Atoi(exp) if err1 != nil { println("bad p", exp) return 0, false } return float32(float64(n) * pow2(e)), true } f64, err1 := strconv.ParseFloat(s, 32)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Oct 06 15:53:04 UTC 2021 - 2.9K bytes - Viewed (0) -
src/net/mac.go
var ok bool if hw[i], ok = xtoi2(s[x:], s[2]); !ok { goto error } x += 3 } } else if s[4] == '.' { if (len(s)+1)%5 != 0 { goto error } n := 2 * (len(s) + 1) / 5 if n != 6 && n != 8 && n != 20 { goto error } hw = make(HardwareAddr, n) for x, i := 0, 0; i < n; i += 2 { var ok bool if hw[i], ok = xtoi2(s[x:x+2], 0); !ok { goto error }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Apr 11 16:34:30 UTC 2022 - 1.9K bytes - Viewed (0) -
cmd/api-resources.go
errCode = ErrNone if values.Get("max-parts") != "" { if maxParts, err = strconv.Atoi(values.Get("max-parts")); err != nil { errCode = ErrInvalidMaxParts return } } else { maxParts = maxPartsList } if values.Get("part-number-marker") != "" { if partNumberMarker, err = strconv.Atoi(values.Get("part-number-marker")); err != nil { errCode = ErrInvalidPartNumberMarker return }
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Wed Jun 07 18:25:26 UTC 2023 - 4.3K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/util/net/port_range.go
var port int port, err = strconv.Atoi(value) if err != nil { return err } low = port high = port case HyphenNotation: low, err = strconv.Atoi(value[:hyphenIndex]) if err != nil { return err } high, err = strconv.Atoi(value[hyphenIndex+1:]) if err != nil { return err } case PlusNotation: var offset int low, err = strconv.Atoi(value[:plusIndex]) if err != nil {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Aug 10 01:27:56 UTC 2020 - 3.4K bytes - Viewed (0) -
src/cmd/cgo/internal/swig/swig_test.go
return } var parseError error atoi := func(s string) int { x, err := strconv.Atoi(s) if err != nil && parseError == nil { parseError = err } return x } var major, minor, patch int major = atoi(string(matches[1])) if len(matches[2]) > 0 { minor = atoi(string(matches[2][1:])) } if len(matches[3]) > 0 { patch = atoi(string(matches[3][1:])) } if parseError != nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 12:38:14 UTC 2024 - 4K bytes - Viewed (0) -
test/fixedbugs/bug262.go
var i int return &i } func main() { m := make(map[string]int) m[f()], *g() = strconv.Atoi(h()) if m["abc"] != 123 || trace != "fgh" { println("BUG", m["abc"], trace) panic("fail") } mm := make(map[string]error) trace = "" mm["abc"] = errors.New("invalid") *i(), mm[f()] = strconv.Atoi(h()) if mm["abc"] != nil || trace != "ifh" { println("BUG1", mm["abc"], trace) panic("fail") }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Feb 17 04:49:59 UTC 2012 - 823 bytes - Viewed (0) -
internal/config/ilm/ilm.go
} if err = config.CheckValidKeys(config.ILMSubSys, kvs, DefaultKVS); err != nil { return cfg, err } tw, err := strconv.Atoi(env.Get(EnvILMTransitionWorkers, kvs.GetWithDefault(transitionWorkers, DefaultKVS))) if err != nil { return cfg, err } ew, err := strconv.Atoi(env.Get(EnvILMExpirationWorkers, kvs.GetWithDefault(expirationWorkers, DefaultKVS))) if err != nil { return cfg, err }
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Fri May 24 23:05:23 UTC 2024 - 1.9K bytes - Viewed (0) -
src/crypto/internal/hpke/hpke_test.go
t.Run(vector.Name, func(t *testing.T) { setup := parseVectorSetup(vector.Setup) kemID, err := strconv.Atoi(setup["kem_id"]) if err != nil { t.Fatal(err) } if _, ok := SupportedKEMs[uint16(kemID)]; !ok { t.Skip("unsupported KEM") } kdfID, err := strconv.Atoi(setup["kdf_id"]) if err != nil { t.Fatal(err) } if _, ok := SupportedKDFs[uint16(kdfID)]; !ok {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 22 22:33:33 UTC 2024 - 4.7K bytes - Viewed (0) -
src/strconv/strconv_test.go
return func(t *testing.T) { t.Helper() if allocs := testing.AllocsPerRun(runsPerTest, f); allocs != 0 { t.Errorf("got %v allocs, want 0 allocs", allocs) } } } t.Run("Atoi", checkNoAllocs(func() { Sink.Int, Sink.Error = Atoi(string(bytes.Number)) })) t.Run("ParseBool", checkNoAllocs(func() { Sink.Bool, Sink.Error = ParseBool(string(bytes.Bool)) })) t.Run("ParseInt", checkNoAllocs(func() {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Aug 23 20:29:22 UTC 2022 - 4.7K bytes - Viewed (0)