capwords: capwords

View source: R/capwords.r

capwordsR Documentation

capwords

Description

Capitalize each word in a character vector of length one.

Usage

capwords(s, strict = FALSE)

Arguments

s

A character vector of length one.

strict

= FALSE If TRUE, force all letters of a word to lowercase after the first letter. Default is FALSE.

Value

The character vector originally submitted via argument s with the first letter of each word capitalized.

Author(s)

WEST Inc.

Examples

#   ---- Capitalize each of 'hello' and 'there'.  
capwords("hello there")

#   ---- Use the strict argument.  Returns 'Camp'.
capwords("CAMP",strict=TRUE)

tmcd82070/CAMP_RST documentation built on April 6, 2022, 12:07 a.m.