hanayo/vendor/zxq.co/ripple/rippleapi/common/int.go

10 lines
167 B
Go
Raw Normal View History

2019-02-23 13:29:15 +00:00
package common
import "strconv"
// Int converts s to an int. If s in an invalid int, it defaults to 0.
func Int(s string) int {
r, _ := strconv.Atoi(s)
return r
}