This function splits strings formatted in camelCase or PascalCase into their
component words. It can handle words where uppercase letters transition to
lowercase letters, and it is capable of handling strings with sequences of
uppercase letters followed by lowercase letters, effectively separating
acronyms from camelCase beginnings.
Usage
splitCamel(x, conseq = TRUE)
splitPascal(x, conseq = TRUE)
Value
A list of character vectors, each containing the parts of the
corresponding CamelCase or PascalCase string split at the appropriate
transitions. If conseq is FALSE, acronyms followed by words are
separated.
Arguments
x
A character vector containing CamelCase or PascalCase strings to
be split.
conseq
Logical indicating whether consecutive uppercase letters should
be treated as part of the previous word (TRUE) or as separate words
(FALSE). Default is TRUE.