Skip to main content

split_identifier

Function split_identifier 

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

Split camelCase/snake_case/kebab-case/path identifiers into lowercase tokens.

Examples: “findPetsByStatus” → [“find”, “pets”, “by”, “status”] “get_user_by_id” → [“get”, “user”, “by”, “id”] “x-api-key” → [“api”, “key”] “/users/{userId}” → [“users”, “user”, “id”] “getHTTPResponse” → [“get”, “http”, “response”] “API_BASE_URL” → [“api”, “base”, “url”]