Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package main
- import (
- "fmt"
- "strconv"
- )
- func main() {
- intToString()
- }
- func intToString() {
- // create an int
- num := 747
- // try to convert int to string
- str := strconv.Itoa(num)
- // here we using PrintF so we can show the value of the string and data type
- fmt.Printf("%v - %T\n", str, str)
- }
Add Comment
Please, Sign In to add comment