Skip to contents

get_suffix returns the longest common suffix of the supplied words.

Usage

get_suffix(words)

Arguments

words

Character vector, A list of words.

Value

A character vector containing the suffix

Examples

# Get suffix
names <- c("xyz_rep", "abc_rep")
get_suffix(names)
#> [1] "_rep"