Reputation: 22055
How can I decompose a unicode character like 밥
into it's components of ㅂㅏㅂ
?
I want to test to see if the decomposition ends with ㅂ
, and then if it does, remove that and recompose the character. For example, turn 밥
to 바
or turn 덥
to 더
.
Upvotes: 0
Views: 177
Reputation: 22055
NSString
has a decomposedStringWithCanonicalMapping
function that does exactly that.
Upvotes: 1