R/toproper.R

Defines functions toproper

Documented in toproper

### Converting word(s) to proper.

#' Converts String text into Proper Format
#'
#' @param x String or variable to be converted to proper
#'
#' @return
#' @export
#'
#' @examples
#' toproper(data$row)
toproper=function(x) {
  gsub("(?<=\\b)([a-z])", "\\U\\1", tolower(x), perl=TRUE)
}
Waiguru254/surveycto documentation built on July 4, 2024, 11:30 a.m.