R/first_up.R

Defines functions firstup

Documented in firstup

#' Function to upper-case 1st letter
#' 
#' @param x character; String for which the first letter should be set to upper
#' case
#' 
#' @author Andreas Scharmueller, \email{andschar@@proton.me}
#' 
#' @export
#'
#' @examples 
#' firstup('andreas')
#' 
#'
firstup = function(x) {
  substr(x, 1, 1) = toupper(substr(x, 1, 1))
  
  x
}
andschar/andmisc documentation built on Jan. 19, 2025, 10:46 a.m.