Golang strconv.AppendInt() function example
package strconv
Golang strconv.AppendInt() function usage example
package main
import (
"fmt"
"strconv"
)
func main() {
//func AppendInt(dst []byte, i int64, base int) []byte
dst := []byte("Int is ")
fmt.Println("Before : ", string(dst))
b := strconv.AppendInt(dst, int64(2), 10)
fmt.Println("After : ", string(b))
b = strconv.AppendInt(dst, int64(23), 10)
fmt.Println("After : ", string(b))
}
Reference :
Advertisement
Something interesting
Tutorials
+4.6k Javascript : Detect when console is activated and do something about it
+9.4k Golang : Scramble and unscramble text message by randomly replacing words
+11.5k CodeIgniter : Import Linkedin data
+16.4k CodeIgniter/PHP : Create directory if does not exist example
+13.7k Golang : Image to ASCII art example
+12k Golang : Convert a rune to unicode style string \u
+6.4k PHP : Proper way to get UTF-8 character or string length
+20.7k Android Studio : AlertDialog and EditText to get user string input example
+8.6k Golang : Add text to image and get OpenCV's X, Y co-ordinates example
+18.7k Unmarshal/Load CSV record into struct in Go
+10.5k RPM : error: db3 error(-30974) from dbenv->failchk: DB_RUNRECOVERY: Fatal error, run database recovery