R/utils.R

Defines functions determine_casing_fn

#' @importFrom magrittr %>%
NULL

determine_casing_fn <- function(case) {
  if (case == 'upper') fn <- stringr::str_to_upper
  if (case == 'lower') fn <- stringr::str_to_lower
  if (case == 'sentence') fn <- stringr::str_to_sentence
  if (case == 'title') fn <- stringr::str_to_title
  return(fn)
}

Try the upstartr package in your browser

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

upstartr documentation built on May 29, 2024, 9:08 a.m.