Skip to content

Instantly share code, notes, and snippets.

@freakynit
Created November 28, 2021 03:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save freakynit/a68ecce5a926c9d48727841394fb6cc4 to your computer and use it in GitHub Desktop.
Save freakynit/a68ecce5a926c9d48727841394fb6cc4 to your computer and use it in GitHub Desktop.
Iterate string containing emoji with skin tone modifier (not working)...
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