string_parseCamel: Parse Camel Case to Catch Spaces in Titles

View source: R/string_parseCamel.R

string_parseCamelR Documentation

Parse Camel Case to Catch Spaces in Titles

Description

This function takes a string e.g. "HelloWorld" and returns a regex expression "Hello World" or "Hello[ ]?World" to allow for flexible string detection.

[ ]: R:%20

Usage

string_parseCamel(x, flex_space = FALSE, force_init_capital = FALSE)

Arguments

x

the string to parse

flex_space

logical. If true, returns ⁠[ ]⁠? between a lower case and Upper case letter to allow a (grepl[]) call to detect the string if it has a space or not. Otherwise returns a space with no '?'. default=FALSE

[ ]: R:%20

force_init_capital

do you want to force the output to start with a capital letter? default=FALSE

See Also

Other simple text string manipulation functions: paste_valid(), string_capitalize_first()


galacticpolymath/GPpub documentation built on April 5, 2025, 6:04 p.m.