R/ucfirst.R

#' ucfirst
#'
#' Uppercases the first character in \code{txt}.
#'
#' @param txt character:
#'
#' @return character
#' @export
#'
#' @examples
#' ucfirst("hello world")
ucfirst <- function (txt) { return (paste0(toupper(substr(txt, 1, 1)), substring(txt, 2))); }

Try the HKRbook package in your browser

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

HKRbook documentation built on Oct. 6, 2022, 9:06 a.m.