split_camel_case

Function split_camel_case 

Source
pub fn split_camel_case(input: &str) -> Vec<String>
Expand description

Splits a string on camel case boundaries This function handles:

  • camelCase -> [“camel”, “case”]
  • PascalCase -> [“pascal”, “case”]
  • acronyms and numbers -> [“parse”, “json”, “to”, “html”, “5”]
  • special cases like OAuth2 -> [“oauth2”]
  • also attempts to split lowercase identifiers that might have been camelCase originally