R/ptd_capitalise.R

Defines functions ptd_title_case ptd_capitalise

ptd_capitalise <- function(x) {
  substr(x, 1, 1) <- toupper(substr(x, 1, 1))
  x
}

ptd_title_case <- function(x) {
  ptd_capitalise(gsub("_(.)", " \\U\\1", x, perl = TRUE))
}
nhs-r-community/NHSRplotthedots documentation built on Feb. 4, 2025, 9:18 a.m.