diff --git a/int_util.go b/int_util.go index 8b32a7d..7b5b733 100644 --- a/int_util.go +++ b/int_util.go @@ -27,6 +27,12 @@ func StringToInt64(s string) int64 { return i } +// StringToFloat64 ... +func StringToFloat64(s string) float64 { + f, _ := strconv.ParseFloat(s, 64) + return f +} + // Int64ToString ... func Int64ToString(i int64) string { return fmt.Sprintf("%d", i)