Skip to main content

camel_tokens

Function camel_tokens 

Source
pub fn camel_tokens(word: &str) -> Vec<String>
Expand description

Splits a single camelCase/PascalCase word into lowercase tokens, treating runs of consecutive capitals as an acronym token of their own (e.g. "HTTPServer" -> ["http", "server"]). Exact regex ported from build_combined_schema.py: [A-Z]?[a-z0-9]+|[A-Z]+(?=[A-Z]|$).