Created
November 28, 2021 03:14
-
-
Save freakynit/a68ecce5a926c9d48727841394fb6cc4 to your computer and use it in GitHub Desktop.
Iterate string containing emoji with skin tone modifier (not working)...
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() { | |
var s string = "h👍🏻e" | |
for i, c := range []rune(s) { | |
fmt.Println(i, string(c)) | |
} | |
} | |
// prints: | |
// ------- | |
// 0 h | |
// 1 👍 | |
// 2 🏻 | |
// 3 e |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment