String case converter.
Project description
Convert string cases between camel case, pascal case, snake case etc…
Usage
import stringcase
stringcase.camelcase('foo_bar_baz') # => "fooBarBaz"
stringcase.camelcase('FooBarBaz') # => "fooBarBaz"
stringcase.capitalcase('foo_bar_baz') # => "Foo_bar_baz"
stringcase.capitalcase('FooBarBaz') # => "FooBarBaz"
stringcase.constcase('foo_bar_baz') # => "FOO_BAR_BAZ"
stringcase.constcase('FooBarBaz') # => "_FOO_BAR_BAZ"
stringcase.lowercase('foo_bar_baz') # => "foo_bar_baz"
stringcase.lowercase('FooBarBaz') # => "foobarbaz"
stringcase.pascalcase('foo_bar_baz') # => "FooBarBaz"
stringcase.pascalcase('FooBarBaz') # => "FooBarBaz"
stringcase.pathcase('foo_bar_baz') # => "foo/bar/baz"
stringcase.pathcase('FooBarBaz') # => "/foo/bar/baz"
stringcase.sentencecase('foo_bar_baz') # => "Foo bar baz"
stringcase.sentencecase('FooBarBaz') # => "Foo bar baz"
stringcase.snakecase('foo_bar_baz') # => "foo_bar_baz"
stringcase.snakecase('FooBarBaz') # => "_foo_bar_baz"
stringcase.spinalcase('foo_bar_baz') # => "foo-bar-baz"
stringcase.spinalcase('FooBarBaz') # => "-foo-bar-baz"
stringcase.titlecase('foo_bar_baz') # => "Foo Bar Baz"
stringcase.titlecase('FooBarBaz') # => " Foo Bar Baz"
stringcase.trimcase('foo_bar_baz') # => "foo_bar_baz"
stringcase.trimcase('FooBarBaz') # => "FooBarBaz"
stringcase.uppercase('foo_bar_baz') # => "FOO_BAR_BAZ"
stringcase.uppercase('FooBarBaz') # => "FOOBARBAZ"
stringcase.alphanumcase('_Foo., Bar') # =>'FooBar'
stringcase.alphanumcase('Foo_123 Bar!') # =>'Foo123Bar'
Install
$ pip install stringcase
License
This software is released under the MIT License.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
stringcase-1.2.0.tar.gz
(3.0 kB
view details)
File details
Details for the file stringcase-1.2.0.tar.gz
.
File metadata
- Download URL: stringcase-1.2.0.tar.gz
- Upload date:
- Size: 3.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 48a06980661908efe8d9d34eab2b6c13aefa2163b3ced26972902e3bdfd87008 |
|
MD5 | 5cb2a0b28f227f19dc830b66f6e46b52 |
|
BLAKE2b-256 | f31f1241aa3d66e8dc1612427b17885f5fcd9c9ee3079fc0d28e9a3aeeb36fa3 |