pub fn to_snake_case(s: &str) -> StringExpand description
Converts a string from any common case to snake_case.
Word boundaries are detected at:
- Non-alphanumeric characters (spaces, hyphens, underscores, colons, etc.)
- Transitions from lowercase or digit to uppercase (
camelCase->camel_case) - Within consecutive uppercase letters, before the last if followed by lowercase
(
XMLParser->xml_parser)