Skip to contents

Remove Modifiers from Emojis

Usage

emoji_modifier_remove(x)

Arguments

x

Characters, vector of emojis.

Value

character vector, single emojis will be replaced with un-modified if possible.

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}‍♀" "🦍"          "💏"          "🏋️‍♂️"