R/str-elem.R

Defines functions str_paste_elems str_elems str_elem

Documented in str_elem str_elems str_paste_elems

#' Extract a single character from a string, using its index.
#'
#' Copy of [strex::str_elem()].
#'
#' @inheritParams match_arg
#'
#' @export
str_elem <- function(...) {
  strex::str_elem(...)
}

#' @rdname str_elem
#' @export
elem <- str_elem

#' Extract several single elements from a string.
#'
#' Copy of [strex::str_elems()].
#'
#' @inheritParams match_arg
#'
#' @export
str_elems <- function(...) {
  strex::str_elems(...)
}

#' @rdname str_elems
#' @export
elems <- str_elems

#' Extract bits of a string and paste them together.
#'
#' Copy of [strex::str_paste_elems()].
#'
#' @inheritParams match_arg
#'
#' @export
str_paste_elems <- function(...) {
  strex::str_paste_elems(...)
}

#' @rdname str_paste_elems
#' @export
paste_elems <- str_paste_elems

Try the filesstrings package in your browser

Any scripts or data that you put into this service are public.

filesstrings documentation built on May 29, 2024, 3:32 a.m.