Remove Modifiers from Emojis
Details
This function is vectorized. See emoji_modifiers for full list of modified emojis and their unmodified state.
Examples
waving_hands <- emojis$emoji[grepl("waving hand", emojis$name)]
waving_hands
#> [1] "👋" "👋🏻" "👋🏼" "👋🏽" "👋🏾" "👋🏿"
emoji_modifier_remove(waving_hands)
#> [1] "👋" "👋" "👋" "👋" "👋" "👋"
set.seed(1234)
emoji_sample <- sample(emojis$emoji, 10)
emoji_sample
#> [1] "👨🏻⚕" "👩\U{01f9b3}"
#> [3] "👩🏾🤝👨🏼" "🤦🏿"
#> [5] "🇨🇼" "\U{01f9d1}🏼❤️\U{01f9d1}🏾"
#> [7] "\U{01f9d6}♀" "🦍"
#> [9] "👩❤️💋👨" "🏋🏻♂"
emoji_modifier_remove(emoji_sample)
#> [1] "👨⚕️" "👩" "👫" "🤦" "🇨🇼"
#> [6] "💑" "\U{01f9d6}♀" "🦍" "💏" "🏋️♂️"