R/first_to_lower.R

Defines functions first_to_lower

Documented in first_to_lower

#' makes just the first letter of string lowercase
#'
#' makes just the first letter of string lowercase and converts numbers to strings
#' @param x a string
#' @keywords strings first_to_lower lowercase
#' @export
#' @examples
#' first_to_lower("Hi There")

first_to_lower <- function(x){
  x_start <- stringr::str_sub(x, 1, 1) %>% stringr::str_to_lower()
  x_end <- stringr::str_sub(x, 2, -1)
  x <- paste0(x_start, x_end)
  return(x)
}
Kidapt/keda documentation built on Oct. 15, 2019, 9:01 p.m.