Skip to contents

Case insensitive matching of argument to possibilities provided in ellipsis.

Usage

match_letters(
  x,
  ...,
  n = 1,
  multiple = FALSE,
  ignore.case = FALSE,
  capitalize = FALSE
)

Arguments

x

(character) to match on

...

(character) vectors to match against

n

(numeric) how many characters of x to use in matching. Set to NULL to use all

multiple

(logical) are multiple matches allowed? If FALSE (Default) only the first match is returned.

ignore.case

if FALSE, the pattern matching is case sensitive and if TRUE, case is ignored during matching.

capitalize

(logical) whether to capitalize the result

Value

(character) vector of matches