- Sort Score
- Result 10 results
- Languages All
Results 41 - 50 of 1,741 for setString (0.16 sec)
-
src/encoding/json/decode.go
if err := d.literalStore(item, kv, true); err != nil { return err } kv = kv.Elem() } else { switch kt.Kind() { case reflect.String: kv = reflect.New(kt).Elem() kv.SetString(string(key)) case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: s := string(key) n, err := strconv.ParseInt(s, 10, 64) if err != nil || kt.OverflowInt(n) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 00:18:55 UTC 2024 - 35.3K bytes - Viewed (0) -
src/testing/quick/quick.go
} case reflect.String: numChars := rand.Intn(complexSize) codePoints := make([]rune, numChars) for i := 0; i < numChars; i++ { codePoints[i] = rune(rand.Intn(0x10ffff)) } v.SetString(string(codePoints)) case reflect.Struct: n := v.NumField() // Divide sizeLeft evenly among the struct fields. sizeLeft := size if n > sizeLeft { sizeLeft = 1 } else if n > 0 {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Nov 08 17:55:47 UTC 2023 - 10.1K bytes - Viewed (0) -
src/go/constant/value.go
if re.Kind() == Unknown || im.Kind() == Unknown { return unknownVal{} } return complexVal{re, im} } func makeFloatFromLiteral(lit string) Value { if f, ok := newFloat().SetString(lit); ok { if smallFloat(f) { // ok to use rationals if f.Sign() == 0 { // Issue 20228: If the float underflowed to zero, parse just "0".
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 12:02:03 UTC 2023 - 34K bytes - Viewed (0) -
pkg/util/iptables/testing/parse.go
field.Set(reflect.ValueOf(&boolVal)) w++ case ipTablesValuePtrType: field.Set(reflect.ValueOf(&IPTablesValue{Negated: negated, Value: words[w+1]})) w += 2 default: field.SetString(words[w+1]) w += 2 } } else if strict { return nil, fmt.Errorf("unrecognized parameter %q", words[w]) } else { // skip w++ } negated = false }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Dec 19 01:20:51 UTC 2023 - 11.6K bytes - Viewed (0) -
src/go/internal/gccgoimporter/testdata/v1reflect.gox
func (v <type 1>) SetLen (n <type -11>); func (v <type 1>) SetMapIndex (key <type 1>, val <type 1>); func (v <type 1>) SetUint (x <type -8>); func (v <type 1>) SetPointer (x <type 7>); func (v <type 1>) SetString (x <type -16>); func (v <type 1>) Slice (beg <type -11>, end <type -11>) <type 1>; func (v <type 1>) String () <type -16>; func (v <type 1>) TryRecv () (x <type 1>, ok <type -15>);
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Sep 30 21:33:51 UTC 2021 - 10.3K bytes - Viewed (0) -
src/crypto/internal/edwards25519/field/fe_test.go
break } buf = append(buf, byte(word)) word >>= 8 } } v.SetBytes(buf[:32]) return v } func (v *Element) fromDecimal(s string) *Element { n, ok := new(big.Int).SetString(s, 10) if !ok { panic("not a valid decimal: " + s) } return v.fromBig(n) } // toBig returns v as a big.Int. func (v *Element) toBig() *big.Int { buf := v.Bytes()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Aug 28 17:26:17 UTC 2023 - 13.9K bytes - Viewed (0) -
test/escape_reflect.go
v := reflect.ValueOf(&a).Elem() // a should not escape, no error printed v.SetInt(int64(x)) return int(v.Int()) } func set5(v reflect.Value, x string) { // ERROR "v does not escape" "leaking param: x$" v.SetString(x) } func set6(v reflect.Value, x []byte) { // ERROR "v does not escape" "leaking param: x$" v.SetBytes(x) } func set7(v reflect.Value, x unsafe.Pointer) { // ERROR "v does not escape" "leaking param: x$"
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Sep 08 18:50:24 UTC 2023 - 13.1K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/text/unicode/norm/composition.go
rb.f = *formTable[f] rb.src.setBytes(src) rb.nsrc = len(src) rb.ss = 0 } func (rb *reorderBuffer) initString(f Form, src string) { rb.f = *formTable[f] rb.src.setString(src) rb.nsrc = len(src) rb.ss = 0 } func (rb *reorderBuffer) setFlusher(out []byte, f func(*reorderBuffer) bool) { rb.out = out rb.flushF = f }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Jan 24 13:01:26 UTC 2024 - 14.1K bytes - Viewed (0) -
src/crypto/ecdsa/ecdsa_test.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Feb 26 21:33:58 UTC 2024 - 13.5K bytes - Viewed (0) -
src/vendor/golang.org/x/text/unicode/norm/composition.go
rb.f = *formTable[f] rb.src.setBytes(src) rb.nsrc = len(src) rb.ss = 0 } func (rb *reorderBuffer) initString(f Form, src string) { rb.f = *formTable[f] rb.src.setString(src) rb.nsrc = len(src) rb.ss = 0 } func (rb *reorderBuffer) setFlusher(out []byte, f func(*reorderBuffer) bool) { rb.out = out rb.flushF = f }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Apr 26 19:27:51 UTC 2019 - 14.1K bytes - Viewed (0)