// Parse s as a hex string with the leading digit indicating its length.
Parse s as a hex string with the leading digit indicating its length.
// Parse s as a hex string with the leading digit indicating its length .
func Parse(s string) (uint64, error) {
	if len(s) <= 1 {
		return 0, errors.New("vex.Parse(): value must have length of at least 2")
	} else if !isHex(s[0]) {
		return 0, errors.New("vex.Parse(): invalid prefix")
	}
	v, err := strconv.ParseUint(s[1:], 16, 64)
	if err != nil {
		return 0, errors.New("vex.Parse(): invalid hex value")
	}
	return v, nil
}
func Parse ( s string ) ( uint64 , error ) { if len ( s ) <= 1 { return 0 , errors . New ( " " ) } else if ! isHex ( s [ 0 ] ) { return 0 , errors . New ( " " ) } v , err := strconv . ParseUint ( s [ 1 : ] , 16 , 64 ) if err != nil { return 0 , errors . New ( " " ) } return v , nil }
Parse s as a hex string with the leading digit indicating its length.
Parse s as a hex string with the leading digit indicating its length .