Skip to main content

pascal_case

Function pascal_case 

Source
pub fn pascal_case(s: &str) -> String
Expand description

Convert a snake_case identifier to PascalCase by uppercasing the first character of each _-separated segment and preserving the rest.

This deliberately splits on _ only; it does not re-case interior letters the way heck::ToUpperCamelCase does, so an acronym-bearing name like get_HTTP becomes GetHTTP, not GetHttp. It is the single source of truth for the snake_to_pascal / to_pascal_case helpers that the Python, Android, and Wasm generators each defined locally.