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.

Source Distribution

py_str_case-0.0.4.tar.gz (2.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

py_str_case-0.0.4-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file py_str_case-0.0.4.tar.gz.

File metadata

  • Download URL: py_str_case-0.0.4.tar.gz
  • Upload date:
  • Size: 2.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/40.6.3 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.7.1

File hashes

Hashes for py_str_case-0.0.4.tar.gz
Algorithm Hash digest
SHA256 c30bc4d2a0e691d263f698af4dc208a3bd4660ff7ab3a3cd155178ed19c92d4f
MD5 37c6a3cfea3e2721e2ba8da29172a5ce
BLAKE2b-256 2c4d1fbfbb950223706e1e6cb578d1c064c5ecf69217b08dad8d161b360df09a

See more details on using hashes here.

File details

Details for the file py_str_case-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: py_str_case-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 3.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/40.6.3 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.7.1

File hashes

Hashes for py_str_case-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 31b4383c897d6f8cc0ea1da8715d36ee7864b1e9e9218eae524d564b6e531f93
MD5 70e63b913e0cf413bb914afbf3a20ced
BLAKE2b-256 22f7cc0a293cd6d35f7b7cfa2223934e61c308e94f90967c61243b5f60ef2d4c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page