Golang convert string to int – example
In Golang, you can convert string to int type using the following functions. strconv.ParseInt(s, base, bitSize) strconv.Atoi(s) Let’s checkout the example of above functions: 1. Golang convert string to int using strconv.ParseInt(s, base, bitSize) The strconv.ParseInt(s, base, bitSize) converts the given string to an integer in the given base (0, 2 to 36) and bit […]