Last active
February 16, 2018 11:41
-
-
Save vkorbes/4edd68b5b7a24c49fc562cb54e2a79c5 to your computer and use it in GitHub Desktop.
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
s := “Ó o auê aí, ô!” | |
for len(s) > 0 { | |
char, size := utf8.DecodeRune([]byte(s)) | |
fmt.Printf(“%-2c → %3d → Size: %1v byte(s).\n”, char, char, size) | |
s = s[size:] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment