Library to change the casing of strings.
Project description
This library provides functions to change the casing convention of a string.
Supported cases:
- camelCase
- dot.case
- kebab-case
- PascalCase
- snake_case
- Title Case
- UPPER.DOT.CASE
- UPPER-KEBAB-CASE
- UPPER_SNAKE_CASE
Install
poetry add case-switcher
pip install case-switcher
Demo
import caseswitcher
sample = "avocado bagel-coffeeDONUTEclair_food.gravy"
caseswitcher.to_camel(sample) # -> "avocadoBagelCoffeeDONUTEclairFoodGravy"
caseswitcher.to_dot(sample) # -> "avocado.bagel.coffee.donut.eclair.food.gravy"
caseswitcher.to_kebab(sample) # -> "avocado-bagel-coffee-donut-eclair-food-gravy"
caseswitcher.to_pascal(sample) # -> "AvocadoBagelCoffeeDONUTEclairFoodGravy"
caseswitcher.to_snake(sample) # -> "avocado_bagel_coffee_donut_eclair_food_gravy"
caseswitcher.to_title(sample) # -> "Avocado Bagel Coffee DONUT Eclair Food Gravy"
caseswitcher.to_upper_dot(sample) # -> "AVOCADO.BAGEL.COFFEE.DONUT.ECLAIR.FOOD.GRAVY"
caseswitcher.to_upper_kebab(sample) # -> "AVOCADO-BAGEL-COFFEE-DONUT-ECLAIR-FOOD-GRAVY"
caseswitcher.to_upper_snake(sample) # -> "AVOCADO_BAGEL_COFFEE_DONUT_ECLAIR_FOOD_GRAVY"
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
case-switcher-1.2.12.tar.gz
(3.8 kB
view details)
Built Distribution
File details
Details for the file case-switcher-1.2.12.tar.gz
.
File metadata
- Download URL: case-switcher-1.2.12.tar.gz
- Upload date:
- Size: 3.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.12 CPython/3.9.7 Linux/5.16.15-76051615-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6142c7cc5b277e532150b03d0d728c02d7f93d1425632f0b37c341047e5ac975 |
|
MD5 | b79d768c2c7749186dc5c18198314a3c |
|
BLAKE2b-256 | ee28ce7a33627b4ac2fc8af41c8d1c0f62d533a87528bf5fb1db8e30988d90f4 |
File details
Details for the file case_switcher-1.2.12-py3-none-any.whl
.
File metadata
- Download URL: case_switcher-1.2.12-py3-none-any.whl
- Upload date:
- Size: 3.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.12 CPython/3.9.7 Linux/5.16.15-76051615-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4e8d0f6f2a86a0d48ffc76faf169943fd2db9ae418f959dc42b47f2ea7774599 |
|
MD5 | 015c155de7fb6b9693fc6f37f1458250 |
|
BLAKE2b-256 | da6b9734b9aa7619c7e96e2c61805f11379de0231e4f31439d4bf4140a56f02b |