Skip to main content

RB toCase is a Case converter.

Project description

RB toCase


made by: RickBarreto

What is it?

RB toCase is a Case converter made in python, for peoples who wants simplify this feature. It can convert to and from Camel, Pascal, Snake, Kebab and Strings Sentences. And, You don't need say what is the input type, the code parse it. Just say whats is the output type.

Older name was toCase, but when I was publishing on Pipy tocase package already exists. So I changed the name!


pip install git+

Why I must to use it?

  • toCase was made to make easy your life with case converting
  • I was made in python, so, if you want, you can copy the and use in your project. It's free to use, look the MIT LICENSE.



$ poetry add rb_tocase


$ pip install rb_tocase



>>> from rb_tocase import Case
>>> # or
>>> from rb_tocase import *
>>> # see the examples below

Convert to Camel Case:

>>> Case.to_camel("Changing to CaMel CASE")   # From String Sentence
>>> Case.to_camel("Changing-to-camel-case")   # From Kebab Case
>>> Case.to_camel("Changing_to_CAMEL_CASE")   # From Snake Case
>>> Case.to_camel(" ChangingToCamelCase  ")   # From Pascal Case

Convert to Snake Case:

>>> Case.to_snake(" ChanginToSnakeCase ")     # From Pascal Case
>>> Case.to_snake(" Changin To Snake Case ")  # From String
>>> Case.to_snake(" Changin-To-Snake-Case ")  # From Kebab
>>> Case.to_snake(" changinToSnakeCase ")     # From Camel

See more

Convert to Kebab Case:

>>> Case.to_kebab("Changing to Kebab")    # From String
>>> Case.to_kebab("ChangingToKebab")      # From Pascal Case
>>> Case.to_kebab("changingToKebab")      # From Camel Case
>>> Case.to_kebab("changing_to_kebab")    # From Snake Case

See more

Convert to Pascal Case:

>>> Case.to_pascal("Changing to Pascal")  # From String
>>> Case.to_pascal("Changing-to-Pascal")  # From Kebab
>>> Case.to_pascal("Changing_to_Pascal")  # From Snake
>>> Case.to_pascal("ChangingtoPascal")    # From Pascal
>>> Case.to_pascal("changingToPascal") # From Camel

Convert to Sentence:

>>> Case.to_sentence("ItsAPascalCase")
'its a pascal case'
>>> Case.to_sentence("itsACamelCase")
'its a camel case'
>>> Case.to_sentence("Its-A-Kebab-Case")
'its a snake case'
>>> Case.to_sentence("Its_a_snake_case")
'its a snake case'

Read The Docs!


Download files

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

Source Distribution

rb_tocase-1.3.2.tar.gz (5.3 kB view hashes)

Uploaded source

Built Distribution

rb_tocase-1.3.2-py2.py3-none-any.whl (4.9 kB view hashes)

Uploaded py2 py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page