emoji_extract: Extract emojis from a string

View source: R/rx.R

emoji_extractR Documentation

Extract emojis from a string

Description

vectorised over string

Usage

emoji_extract(string)

emoji_extract_all(string, simplify = FALSE)

Arguments

string

Input vector.

simplify

see stringr::str_extract_all()

Value

A character vector

See Also

stringr::str_extract() and stringr::str_extract_all()

Examples

chars <- c(letters[1:4], emoji_name[1:6])

set.seed(1234)

strings <- lapply(1:10, function(x) paste(sample(chars, x), collapse = ""))

extracts <- emoji_extract(strings)

all_extracts <- emoji_extract_all(strings)

emoji documentation built on Oct. 30, 2024, 9:28 a.m.