has syntax check and return an error if s is empty or contains invalid digits.
has range check and return the the closest number among the range if overflow.
// The errors that ParseInt returns have concrete type *NumError
// and include err.Num = s. If s is empty or contains invalid
// digits, err.Err = ErrSyntax and the returned value is 0;
// if the value corresponding to s cannot be represented by a
// signed integer of the given size, err.Err = ErrRange and the
// returned value is the maximum magnitude integer of the
// appropriate bitSize and sign.
func ParseInt(s string, base int, bitSize int) (i int64, err error) {
I need these but fastjson.ParseInt64BestEffort behaves differently.
The
strconv.ParseInt
in Golang std libI need these but
fastjson.ParseInt64BestEffort
behaves differently.