MCPcopy Create free account
hub / github.com/code-scan/Goal / Str2Int

Function Str2Int

Gconvert/num.go:24–32  ·  view source on GitHub ↗
(s string)

Source from the content-addressed store, hash-verified

22}
23
24func Str2Int(s string) int {
25 ret, err := strconv.Atoi(s)
26 if err != nil {
27 log.Println("[!] Str2Int Error: ", err)
28
29 return 0
30 }
31 return ret
32}
33func Str2Int64(s string) int64 {
34 ret, err := strconv.ParseInt(s, 10, 64)
35 if err != nil {

Callers 1

TestConvertFunction · 0.92

Calls

no outgoing calls

Tested by 1

TestConvertFunction · 0.74