Macro include_sql::to_snake_case
source · [−]to_snake_case!() { /* proc-macro */ }
Expand description
Converts an ident
into a snake-case ident
using the following rules:
- Leading and trailing underscores are removed
- All letters are lowered
- An underscore is inserted before a letter (except before the first one):
- if it used to be an uppercase one and
- if it does not already have an underscore in front of it