Skip to main content

String case converter

Project description

Build StatusPyPI

py_str_case

This module is extension of stringcase.

Convert string cases between camel case, pascal case, snake case etc...

Examples

import py_str_case
py_str_case.camelcase('foo_bar_baz') # => "fooBarBaz"
py_str_case.camelcase('FooBarBaz') # => "fooBarBaz"
py_str_case.capitalcase('foo_bar_baz') # => "Foo_bar_baz"
py_str_case.capitalcase('FooBarBaz') # => "FooBarBaz"
py_str_case.constcase('foo_bar_baz') # => "FOO_BAR_BAZ"
py_str_case.constcase('FooBarBaz') # => "FOO_BAR_BAZ"
py_str_case.lowercase('foo_bar_baz') # => "foo_bar_baz"
py_str_case.lowercase('FooBarBaz') # => "foobarbaz"
py_str_case.pascalcase('foo_bar_baz') # => "FooBarBaz"
py_str_case.pascalcase('FooBarBaz') # => "FooBarBaz"
py_str_case.pathcase('foo_bar_baz') # => "foo/bar/baz"
py_str_case.pathcase('FooBarBaz') # => "foo/bar/baz"
py_str_case.sentencecase('foo_bar_baz') # => "Foo bar baz"
py_str_case.sentencecase('FooBarBaz') # => "Foo bar baz"
py_str_case.snakecase('foo_bar_baz') # => "foo_bar_baz"
py_str_case.snakecase('FooBarBaz') # => "foo_bar_baz"
py_str_case.spinalcase('foo_bar_baz') # => "foo-bar-baz"
py_str_case.spinalcase('FooBarBaz') # => "-foo-bar-baz"
py_str_case.titlecase('foo_bar_baz') # => "Foo Bar Baz"
py_str_case.titlecase('FooBarBaz') # => " Foo Bar Baz"
py_str_case.trimcase('foo_bar_baz') # => "foo_bar_baz"
py_str_case.trimcase(' FooBarBaz ') # => "FooBarBaz"
py_str_case.uppercase('foo_bar_baz') # => "FOO_BAR_BAZ"
py_str_case.uppercase('FooBarBaz') # => "FOOBARBAZ"
py_str_case.alphanumcase('_Foo., Bar') # =>'FooBar'
py_str_case.alphanumcase('Foo_123 Bar!') # =>'Foo123Bar'

Failure Message

py_str_case.alphanumcase('') # =>'Enter the string to convert..'

Install

pip install py_str_case

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for py-str-case, version 0.0.4
Filename, size File type Python version Upload date Hashes
Filename, size py_str_case-0.0.4-py3-none-any.whl (3.7 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size py_str_case-0.0.4.tar.gz (2.7 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page