R/capitalize_first_char.R

Defines functions capitalize_first_char

Documented in capitalize_first_char

#' Convert the first character to upper case.
#'
#' Convert the first character to upper case. If the first
#' character is upper case, nothing will happen.
#' @param s a string
#' @return the string, with the first letter in uppercase
#' @author Richèl J.C. Bilderbeek
#' @examples
#' capitalize_first_char("hello")
#' @export
capitalize_first_char <- function(s) {
  testit::assert(is.character(s))
  testit::assert(nchar(s) > 0)
  substr(s, 1, 1) <- toupper(substr(s, 1, 1))
  s
}

Try the netmhc2pan package in your browser

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

netmhc2pan documentation built on Nov. 9, 2023, 1:08 a.m.