R/capitalize.R

Defines functions capitalize

Documented in capitalize

#' Get Operating System Info
#'
#' This function allows you to get your operating system info.
#' @param activate Do you love OS? Defaults to TRUE.
#' @keywords IP Address
#' @export
#' @examples
#' capitalize("word")
 
capitalize <- function(s){

name <- s

CapStr <- function(y) {
  c <- strsplit(y, " ")[[1]]
  paste(toupper(substring(c, 1,1)), substring(c, 2),
      sep="", collapse=" ")}

capitalize_str <- function(charcter_string){sapply(charcter_string, CapStr)}

return(capitalize_str(name))

}
sabalicodev/sabali documentation built on Jan. 13, 2020, 2:22 p.m.