format_capitalize: Capitalizes the first letter in a string

View source: R/format_capitalize.R

format_capitalizeR Documentation

Capitalizes the first letter in a string

Description

This function converts the first letter in a string into upper case.

Usage

format_capitalize(x, verbose = TRUE)

Arguments

x

A character vector or a factor. The latter is coerced to character. All other objects are returned unchanged.

verbose

Toggle warnings.

Value

x, with first letter capitalized.

Examples

format_capitalize("hello")
format_capitalize(c("hello", "world"))
unique(format_capitalize(iris$Species))

insight documentation built on Nov. 26, 2023, 5:08 p.m.