golang convert int to string
str := strconv.Itoa(12)
go convert integer to string
s := strconv.Itoa(i)
// also
s := strconv.FormatInt(i, 10)
// and also
s := fmt.Sprintf("%d", i)
golang parse float64
f, err := strconv.ParseFloat("3.1415", 64)
golang convert string to int64
s := "97"
n, err := strconv.ParseInt(s, 10, 64)
if err == nil {
fmt.Printf("%d of type %T", n, n)
}
convert string to int golang
var s string
i, err := strconv.Atoi(s)
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us