ripple-api/common/int.go

8 lines
149 B
Go
Raw Normal View History

package common
// 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
}