Skip to contents

Get the common prefix of words

Usage

get_prefix(words)

Arguments

words

A character vector of words

Value

A character string that is the common prefix of all words

Examples

get_prefix(c("animal", "antelope", "anteater"))
#> [1] "an"