R: Split a string based on CamelCase.

str_split_camel_case {strex} | R Documentation

## Split a string based on CamelCase.

### Description

Vectorized over `string`.

### Usage

    str_split_camel_case(string, lower = FALSE)

### Arguments

`string` | A character vector.
`lower` | Do you want the output to be all lower case (or as is)?

### Value

A list of character vectors, one list element for each element of `string`.

### References

Adapted from Ramnath Vaidyanathan's answer at http://stackoverflow.com/questions/8406974/splitting-camelcase-in-r.

### See Also

Other splitters: `str_split_by_numbers`

### Examples

    str_split_camel_case(c("RoryNolan", "NaomiFlagg", "DepartmentOfSillyHats"))
    str_split_camel_case(c("RoryNolan", "NaomiFlagg", "DepartmentOfSillyHats",
      lower = TRUE
    ))

[Package strex version 1.2.0 Index]