Skip to contents

Vectorised over string and replacement

Usage

emoji_replace(string, replacement)

emoji_replace_all(string, replacement)

Arguments

string

Input vector

replacement

A character vector of replacements. Should either be of length 1 or the same length as string. See stringr::str_replace() for details

Value

A character vector

Examples

emoji_replace(emoji_name[1], "_emoji_")
#> [1] "_emoji_"

string <- paste(c(letters[1:4], emoji_name[1:6]), collapse = " ")

emoji_replace_all(emoji_name[1:6], "_emoji_")
#> [1] "_emoji_" "_emoji_" "_emoji_" "_emoji_" "_emoji_" "_emoji_"