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))

easystats/insight documentation built on Dec. 14, 2024, 12:34 p.m.