How to replace emoji characters with their descriptions in a Swift string
问题 I'm looking for a way to replace emoji characters with their description in a Swift string. Example: Input "This is my string 😄" I'd like to replace the 😄 to get: Output "This is my string {SMILING FACE WITH OPEN MOUTH AND SMILING EYES}" To date I'm using this code modified from the original code of this answer by MartinR, but it works only if I deal with a single character. let myCharacter : Character = "😄" let cfstr = NSMutableString(string: String(myCharacter)) as CFMutableString var range