Last active
May 15, 2017 15:05
-
-
Save cecyc/440345082821e5f231c5ff1c6c3e416c to your computer and use it in GitHub Desktop.
Print out runes in Golang (from Todd McLeod Golang training). Pretty neat for teaching unicode and special characters.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import "fmt" | |
func main() { | |
for i := 0; i <= 500; i++ { | |
//Print the integer, the string of i (rune), and the bytes of i | |
fmt.Println(i, " - ", string(i), []byte(string(i))) | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment