String case conversion, identification, parsing and creation
Style | Example |
---|---|
lower | foo bar |
upper | FOO BAR |
title | Foo Bar |
sentence | Foo bar |
snake | foo_bar |
helter | Foo_Bar |
macro | FOO_BAR |
kebab | foo-bar |
train | Foo-Bar |
cobol | FOO-BAR |
flat | foobar |
flush | FOOBAR |
pascal | FooBar |
camel | fooBar |
dot | foo.bar |
path | foo/bar |
>>> import case
>>> case.snake('alphaBRAVOCharlie')
'alpha_bravo_charlie'
>>> case.identify('FooBar')
[Case(style='pascal')]