Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/tombulled/case

String case conversion, identification and parsing
https://github.com/tombulled/case

Last synced: 23 days ago
JSON representation

String case conversion, identification and parsing

Awesome Lists containing this project

README

        

# case
String case conversion, identification, parsing and creation

## Styles
| 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 |

## Usage
```python
>>> import case
```

### Conversion
```python
>>> case.snake('alphaBRAVOCharlie')
'alpha_bravo_charlie'
```

### Identification
```python
>>> case.identify('FooBar')
[Case(style='pascal')]
```