File: upFirst.Rd

package info (click to toggle)
hmisc 4.2-0-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 3,332 kB
  • sloc: asm: 27,116; fortran: 606; ansic: 411; xml: 160; makefile: 2
file content (22 lines) | stat: -rw-r--r-- 792 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
\name{upFirst}
\alias{upFirst}
\title{Change First Letters to Upper Case}
\usage{
upFirst(txt, lower = FALSE, alllower = FALSE)
}
\arguments{
\item{txt}{a character vector}

\item{lower}{set to \code{TRUE} to make only the very first letter of the string upper case, and to keep words with at least 2 capital letters in their original form}

\item{alllower}{set to \code{TRUE} to make every word start with lower case unless it has at least 2 caps}
}
\description{
Changes the first letter of each word in a string to upper case, keeping selected words in lower case.  Words containing at least 2 capital letters are kept as-is.
}
\examples{
upFirst(c('this and that','that is Beyond question'))
}
\references{
\url{http://en.wikipedia.org/wiki/Letter_case#Headings_and_publication_titles}
}