R/totitle.R

Defines functions totitle

Documented in totitle

totitle <-
function(x,USE.NAMES=FALSE) {
  s <- sapply(x, function(x) strsplit(x, "\\s", perl=TRUE, fixed=FALSE))
  s <- sapply(s, function(s) paste(gsub("(.)(.*)", "\\U\\1\\E\\2", s, perl=TRUE), collapse=" "))
  s
}
vlulla/vlutils documentation built on May 21, 2019, 12:35 a.m.