Commit 9a36fac2 authored by Vladimir Barsukov's avatar Vladimir Barsukov
Browse files

parse num

parent 0702ebcc
package zutils
import "strconv"
func ParseFloat(s string) float64 {
f, _ := strconv.ParseFloat(s, 64)
return f
}
func ParseInt(s string) int {
f, _ := strconv.ParseInt(s, 10, 32)
return int(f)
}
func ParseInt64(s string) int64 {
f, _ := strconv.ParseInt(s, 10, 64)
return f
}
func ParseUInt(s string) uint64 {
f, _ := strconv.ParseUint(s, 10, 64)
return f
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment