Golang strconv.Atoi() function example
package strconv
Golang strconv.Atoi() function usage example
package main
import (
"fmt"
"strconv"
)
func main() {
var i int
i, _ = strconv.Atoi("123")
fmt.Println(i)
}
References :
https://www.socketloop.com/tutorials/golang-convert-cast-string-to-integer-value
Advertisement
Something interesting
Tutorials
+11k Golang : Create S3 bucket with official aws-sdk-go package
+62.7k Golang : Convert HTTP Response body to string
+15.2k Golang : How to add color to string?
+10.2k Golang : Use regular expression to get all upper case or lower case characters example
+4.7k Chrome : How to block socketloop.com links in Google SERP?
+6.9k Golang : Normalize email to prevent multiple signups example
+10.1k Golang : Compare files modify date example
+7.3k Golang : File system scanning
+5.8k CodeIgniter/PHP : Remove empty lines above RSS or ATOM xml tag
+10.1k Golang : How to get quoted string into another string?
+18.4k Golang : Logging with logrus