>>> to_snake_case("one two 31235three4four", True) 'ONE_TWO_31235THREE4FOUR' >>> to_snake_case("one two 31235three4four", False) 'one_two_31235three4four'
(text: str, upper: bool)
| 99 | |
| 100 | |
| 101 | def to_snake_case(text: str, upper: bool) -> str: |
| 102 | """ |
| 103 | >>> to_snake_case("one two 31235three4four", True) |
| 104 | 'ONE_TWO_31235THREE4FOUR' |
| 105 | >>> to_snake_case("one two 31235three4four", False) |
| 106 | 'one_two_31235three4four' |
| 107 | """ |
| 108 | return to_complex_case(text, upper, "_") |
| 109 | |
| 110 | |
| 111 | def to_kebab_case(text: str, upper: bool) -> str: |
nothing calls this directly
no test coverage detected