match_arg: Argument Matching

Description Usage Arguments

Description

See strex::match_arg().

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
match_arg(
  arg,
  choices = NULL,
  index = FALSE,
  several_ok = FALSE,
  ignore_case = FALSE
)

str_match_arg(
  arg,
  choices = NULL,
  index = FALSE,
  several_ok = FALSE,
  ignore_case = FALSE
)

Arguments

arg

A character vector (of length one unless several_ok = TRUE).

choices

A character vector of candidate values.

index

Return the index of the match rather than the match itself?

several_ok

Allow arg to have length greater than one to match several arguments at once?

ignore_case

Ignore case while matching. If this is TRUE, the returned value is the matched element of choices (with its original casing).


filesstrings documentation built on April 18, 2021, 9:12 a.m.