Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Sequence of converting country code to flag
"FR".codepoints
#=> [70, 82]
70 + 127397
#=> 127467
127467.chr(Encoding::UTF_8)
#=> "🇫"
82 + 127397
#=> 1274879
127479.chr(Encoding::UTF_8)
#=> "🇷"
["🇫", "🇷"].join
#=> "🇫🇷"
"🇫🇷".codepoints # 確認
#=> [127467, 127479]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment