Library to change the casing of strings.
Project description
Case Switcher
Change casing of a string.
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
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.0.tar.gz
(14.6 kB
view details)
Built Distribution
File details
Details for the file case-switcher-1.2.0.tar.gz
.
File metadata
- Download URL: case-switcher-1.2.0.tar.gz
- Upload date:
- Size: 14.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.12 CPython/3.9.7 Linux/5.15.15-76051515-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 22a6de03d13759a57abf9a930f9ed8bfda5708c63182f0f371dfd7b54e4fbf91 |
|
MD5 | 31fcec667efc2746a6a6761e2c2b28c0 |
|
BLAKE2b-256 | a529f0ac81d4dc14c4c585f9f76b0c5dcd796cbcc37213a9cbe3e093b665907a |
File details
Details for the file case_switcher-1.2.0-py3-none-any.whl
.
File metadata
- Download URL: case_switcher-1.2.0-py3-none-any.whl
- Upload date:
- Size: 14.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.12 CPython/3.9.7 Linux/5.15.15-76051515-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bb87f900eb9dd40518ecc1e0ec7c43b384bd27549627a0c32fa319c8a6ac1be4 |
|
MD5 | 96af64004b35b1270d6d2258799d253f |
|
BLAKE2b-256 | 44e2b71268202ea35170296d4b5dfdd0fb452843ff0a3b9b701df302f4ba7487 |