Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for ExampleParseFloat (0.1 sec)

  1. src/strconv/example_test.go

    	// string, 10
    }
    
    func ExampleParseBool() {
    	v := "true"
    	if s, err := strconv.ParseBool(v); err == nil {
    		fmt.Printf("%T, %v\n", s, s)
    	}
    
    	// Output:
    	// bool, true
    }
    
    func ExampleParseFloat() {
    	v := "3.1415926535"
    	if s, err := strconv.ParseFloat(v, 32); err == nil {
    		fmt.Printf("%T, %v\n", s, s)
    	}
    	if s, err := strconv.ParseFloat(v, 64); err == nil {
    		fmt.Printf("%T, %v\n", s, s)
    	}
    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