Skip to main content

pascal_to_screaming_snake

Function pascal_to_screaming_snake 

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

TextMessageStart -> TEXT_MESSAGE_START.

Runs of capitals stay together (JSONPatch -> JSON_PATCH, not J_S_O_N_PATCH), which is the same rule serde’s SCREAMING_SNAKE_CASE applies to variant names.