Last active
April 6, 2019 07:55
-
-
Save hngfu/fb0862afe1dd619995c33a02d7ec6a0b 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
let scalar = Unicode.Scalar("흥") | |
let consonantIndex = (scalar.value - 0xac00) / 28 / 21 | |
let consonantScalar = Unicode.Scalar(consonantIndex + 0x1100)! | |
print(consonantScalar) //ㅎ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment