-
-
Save ra/7805934 to your computer and use it in GitHub Desktop.
print runes over for loop range of Unicode code points
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() { | |
// x := string([]rune{0x767d, 0x9d6c, 0x7fd4}) // works | |
// x := string(rune(0x66)) // works | |
for x := 0x0e82; x < 0x0ec6; x++ { // change these bounds to see other glyphs | |
y := string(rune(x)) | |
fmt.Println("decimal code point and its rune:", x, y) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment