Home > OS >  Swift 5 – How to use base emoji in case statement that may have skin-tone emoji as input?
Swift 5 – How to use base emoji in case statement that may have skin-tone emoji as input?

Time:10-06

The input to my switch may or may not be an emoji with skin tone.

Do I have to test for all six variations for each emoji that can have a skin tone or is there a simple one-liner way to strip out the base emoji from the emoji modifier?

Here is my failing code:

switch blah {
    case "✅":
        daIcon = self.iconComplete!
    case "           
  • Related