parse.go 372 Bytes
Newer Older
Vladimir Barsukov's avatar
Vladimir Barsukov committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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
}