capitalize_words: Capitalize Words

View source: R/helpers.R

capitalize_wordsR Documentation

Capitalize Words

Description

Capitalizes words in character strings.

Usage

capitalize_words(x, strict = FALSE, first = FALSE)

Arguments

x

Character vector.

strict

Whether to lowercase characters not being capitalized.

first

Whether to only capitalize the first word.

Value

Character vector of the same length as x.

See Also

Other helper functions: ch1903_to_wgs84, clean_strings, format_addresses, format_scientific_names, is.empty, lvapply, melt_by_listcol, na.remove, normalize_language, parse_scientific_names, quotemeta, replace_values_in_list, sp_transform, subset_search_results, unique_na

Examples

x <- "hello wORLd"
capitalize_words(x)
capitalize_words(x, first = TRUE)
capitalize_words(x, strict = TRUE)
capitalize_words("3-in-1 pear", first = TRUE)

falling-fruit/fruitr documentation built on Dec. 21, 2024, 8:32 p.m.