Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for decUint8 (0.97 sec)

  1. src/internal/gover/gover.go

    	}
    	if len(x) > len(y) {
    		return +1
    	}
    	if x < y {
    		return -1
    	} else {
    		return +1
    	}
    }
    
    // DecInt returns the decimal string decremented by 1, or the empty string
    // if the decimal is all zeroes.
    // (Copied from golang.org/x/mod/module's decDecimal.)
    func DecInt(decimal string) string {
    	// Scan right to left turning 0s to 9s until you find a digit to decrement.
    	digits := []byte(decimal)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Nov 06 23:20:32 UTC 2023
    - 5.8K bytes
    - Viewed (0)
  2. src/cmd/go/internal/gover/gover.go

    //
    // Examples:
    //
    //	Prev("1.2") = "1.1"
    //	Prev("1.3rc4") = "1.2"
    func Prev(x string) string {
    	v := gover.Parse(x)
    	if gover.CmpInt(v.Minor, "1") <= 0 {
    		return v.Major
    	}
    	return v.Major + "." + gover.DecInt(v.Minor)
    }
    
    // IsValid reports whether the version x is valid.
    func IsValid(x string) bool {
    	return gover.IsValid(x)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Nov 06 23:20:32 UTC 2023
    - 2.5K bytes
    - Viewed (0)
Back to top