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 Feb. 23, 2021, 9:06 a.m.