>>> to_kebab_case("one two 31235three4four", True) 'ONE-TWO-31235THREE4FOUR' >>> to_kebab_case("one two 31235three4four", False) 'one-two-31235three4four'
(text: str, upper: bool)
| 109 | |
| 110 | |
| 111 | def to_kebab_case(text: str, upper: bool) -> str: |
| 112 | """ |
| 113 | >>> to_kebab_case("one two 31235three4four", True) |
| 114 | 'ONE-TWO-31235THREE4FOUR' |
| 115 | >>> to_kebab_case("one two 31235three4four", False) |
| 116 | 'one-two-31235three4four' |
| 117 | """ |
| 118 | return to_complex_case(text, upper, "-") |
| 119 | |
| 120 | |
| 121 | if __name__ == "__main__": |
nothing calls this directly
no test coverage detected