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
- TitleCase
- 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.1.0.tar.gz
(15.6 kB
view details)
File details
Details for the file case-switcher-1.1.0.tar.gz
.
File metadata
- Download URL: case-switcher-1.1.0.tar.gz
- Upload date:
- Size: 15.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.4.2 requests/2.26.0 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.9.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1017e8c5e8009e80230b53a8abdd3d44cf4090a029f738f8f55551c40639c61b |
|
MD5 | b7a30dc2043506fb6b3a73f5c1dae264 |
|
BLAKE2b-256 | 19129d32001f105a5abbe6b463bbcdefcbd3871fd2e00b6e62b359369e29f402 |