Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 16 for AppendUint (0.22 sec)

  1. src/crypto/x509/oid.go

    		if valEnd {
    			if start == 0 {
    				if val < 80 {
    					b.Write(strconv.AppendUint(numBuf, val/40, 10))
    					b.WriteByte('.')
    					b.Write(strconv.AppendUint(numBuf, val%40, 10))
    				} else {
    					b.WriteString("2.")
    					b.Write(strconv.AppendUint(numBuf, val-80, 10))
    				}
    			} else {
    				b.Write(strconv.AppendUint(numBuf, val, 10))
    			}
    			val = 0
    			start = i + 1
    		}
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 19:10:38 UTC 2024
    - 8.3K bytes
    - Viewed (0)
  2. src/strconv/itoa.go

    	return dst
    }
    
    // AppendUint appends the string form of the unsigned integer i,
    // as generated by [FormatUint], to dst and returns the extended buffer.
    func AppendUint(dst []byte, i uint64, base int) []byte {
    	if fastSmalls && i < nSmalls && base == 10 {
    		return append(dst, small(int(i))...)
    	}
    	dst, _ = formatBits(dst, i, base, false, true)
    	return dst
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 04 14:21:28 UTC 2024
    - 5.3K bytes
    - Viewed (0)
  3. 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)
  4. src/strconv/example_test.go

    	// Output:
    	// quote (ascii):"\"Fran & Freddie's Diner\""
    }
    
    func ExampleAppendUint() {
    	b10 := []byte("uint (base 10):")
    	b10 = strconv.AppendUint(b10, 42, 10)
    	fmt.Println(string(b10))
    
    	b16 := []byte("uint (base 16):")
    	b16 = strconv.AppendUint(b16, 42, 16)
    	fmt.Println(string(b16))
    
    	// Output:
    	// uint (base 10):42
    	// uint (base 16):2a
    }
    
    func ExampleAtoi() {
    	v := "10"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Oct 13 22:57:37 UTC 2023
    - 8.9K bytes
    - Viewed (0)
  5. src/log/slog/json_handler.go

    }
    
    func appendJSONValue(s *handleState, v Value) error {
    	switch v.Kind() {
    	case KindString:
    		s.appendString(v.str())
    	case KindInt64:
    		*s.buf = strconv.AppendInt(*s.buf, v.Int64(), 10)
    	case KindUint64:
    		*s.buf = strconv.AppendUint(*s.buf, v.Uint64(), 10)
    	case KindFloat64:
    		// json.Marshal is funny about floats; it doesn't
    		// always match strconv.AppendFloat. So just call it.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Nov 17 16:18:11 UTC 2023
    - 8.1K bytes
    - Viewed (0)
  6. 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)
  7. internal/bucket/replication/datatypes_gen.go

    		err = msgp.WrapError(err)
    		return
    	}
    	return
    }
    
    // MarshalMsg implements msgp.Marshaler
    func (z Type) MarshalMsg(b []byte) (o []byte, err error) {
    	o = msgp.Require(b, z.Msgsize())
    	o = msgp.AppendInt(o, int(z))
    	return
    }
    
    // UnmarshalMsg implements msgp.Unmarshaler
    func (z *Type) UnmarshalMsg(bts []byte) (o []byte, err error) {
    	{
    		var zb0001 int
    		zb0001, bts, err = msgp.ReadIntBytes(bts)
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri Mar 08 19:08:18 UTC 2024
    - 2.3K bytes
    - Viewed (0)
  8. src/cmd/compile/internal/types/pkg.go

    // the decimal n. If prefix is too long, LookupNum panics.
    func (pkg *Pkg) LookupNum(prefix string, n int) *Sym {
    	var buf [20]byte // plenty long enough for all current users
    	copy(buf[:], prefix)
    	b := strconv.AppendInt(buf[:len(prefix)], int64(n), 10)
    	return pkg.LookupBytes(b)
    }
    
    // Selector looks up a selector identifier.
    func (pkg *Pkg) Selector(name string) *Sym {
    	if IsExported(name) {
    		pkg = LocalPkg
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Nov 08 16:28:50 UTC 2023
    - 3.1K bytes
    - Viewed (0)
  9. utils/utils.go

    		frame, _ := frames.Next()
    		if (!strings.HasPrefix(frame.File, gormSourceDir) ||
    			strings.HasSuffix(frame.File, "_test.go")) && !strings.HasSuffix(frame.File, ".gen.go") {
    			return string(strconv.AppendInt(append([]byte(frame.File), ':'), int64(frame.Line), 10))
    		}
    	}
    
    	return ""
    }
    
    func IsValidDBNameChar(c rune) bool {
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Mon Apr 22 06:43:02 UTC 2024
    - 3.8K bytes
    - Viewed (0)
  10. staging/src/k8s.io/apimachinery/pkg/api/resource/amount.go

    		exponent = exponent - 1
    	case 2, -1:
    		amount, ok = int64MultiplyScale100(amount)
    		if !ok {
    			return infDecAmount{a.AsDec()}.AsCanonicalBytes(out)
    		}
    		exponent = exponent - 2
    	}
    	return strconv.AppendInt(out, amount, 10), exponent
    }
    
    // AsCanonicalBase1024Bytes accepts a buffer to write the base-1024 string value of this field to, and returns
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Oct 13 19:42:28 UTC 2023
    - 9.3K bytes
    - Viewed (0)
Back to top