Skip to main content

split_identifier

Function split_identifier 

Source
pub fn split_identifier(token: &str) -> Vec<String>
Expand description

Split a single identifier into sub-tokens via camelCase / snake_case.

Returns the original token (lowered) plus any sub-tokens.

§Examples

  • HandlerStack["handlerstack", "handler", "stack"]
  • getHTTPResponse["gethttpresponse", "get", "http", "response"]
  • my_func["my_func", "my", "func"]
  • XMLParser["xmlparser", "xml", "parser"]
  • simple["simple"]

Mirrors the Python split_identifier function exactly.