Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for ExampleAppendInt (0.25 sec)

  1. src/strconv/example_test.go

    	b64 := []byte("float64:")
    	b64 = strconv.AppendFloat(b64, 3.1415926535, 'E', -1, 64)
    	fmt.Println(string(b64))
    
    	// Output:
    	// float32:3.1415927E+00
    	// float64:3.1415926535E+00
    }
    
    func ExampleAppendInt() {
    	b10 := []byte("int (base 10):")
    	b10 = strconv.AppendInt(b10, -42, 10)
    	fmt.Println(string(b10))
    
    	b16 := []byte("int (base 16):")
    	b16 = strconv.AppendInt(b16, -42, 16)
    	fmt.Println(string(b16))
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Oct 13 22:57:37 UTC 2023
    - 8.9K bytes
    - Viewed (0)
Back to top