str_nth_instance_indices

0th

Percentile

Get the indices of the \(n\)th instance of a pattern.

See strex::str_locate_nth().

Usage
str_nth_instance_indices(string, pattern, n)

str_first_instance_indices(string, pattern)

str_last_instance_indices(string, pattern)

Arguments
string

A character vector. These functions are vectorized over this argument.

pattern

A character vector. Pattern(s) specified like the pattern(s) in the stringr package (e.g. look at stringr::str_locate()). If this has length >1 its length must be the same as that of string.

n

Then \(n\) for the \(n\)th instance of the pattern.

Aliases
  • str_nth_instance_indices
  • str_first_instance_indices
  • str_last_instance_indices
Documentation reproduced from package filesstrings, version 3.0.0, License: GPL-3

Community examples

Looks like there are no examples yet.