Skip to main content

Super-case-convertor-2000

Quick start


First, install the library

pip3 install super-case-converter-2000

include in your project

from converter import case

Methods

snake

Convert string to 'snake case' string

alias

  • c_case
snake(string: str = "", replaceSeparator: Optional[str] = None) -> str:

Example

string_camel = "stringCase"

string_snake = case.snake(string=string_camel)

# alias
string_c_case = case.c_case(string=string_camel)

print(string_snake, string_c_case)
Output
string_case string_case

Example

string_custom = "string!!case"

string_snake = case.snake(string=string_custom, replaceSeparator='!!')

# alias
string_c_case = case.c_case(string=string_custom, replaceSeparator='!!')

print(string_snake, string_c_case)
Output
string_case string_case

camel

Convert string to 'camel case' string

camel(string: str = "", replaceSeparator: Optional[str] = None) -> str:

Example

string_snake = "string_case"

string_camel = case.camel(string=string_snake)

print(string_camel)
Output
stringCase

Example

string_custom = "string!!case"

string_camel = case.camel(string=string_custom, replaceSeparator='!!')

print(string_camel)
Output
stringCase

pascal

Convert string to 'pascal case' string

alias

  • capital_camel
pascal(string: str = "", replaceSeparator: Optional[str] = None) -> str:

Example

string_snake = "string_case"

string_pascal = case.pascal(string=string_snake)

# alias
string_capital_camel = case.capital_camel(string=string_snake)

print(string_pascal, string_capital_camel)
Output
StringCase StringCase

Example

string_custom = "string!!case"

string_pascal = case.pascal(string=string_custom, replaceSeparator='!!')

print(string_pascal)
Output
StringCase

kebab

Convert string to 'kebak case' string

alias

  • kebabm
  • caterpillar
  • dash
  • hyphen
  • lisp
  • spinal
  • css
kebab(string: str = "", replaceSeparator: Optional[str] = None) -> str:

Example

string_snake = "string_case"

string_kebab = case.kebab(string=string_snake)

# alias
string_caterpillar = case.caterpillar(string=string_snake)

print(string_kebab, string_caterpillar)

Output

string-case string-case

Example

string_custom = "string!!case"

string_kebab = case.kebab(string=string_custom, replaceSeparator='!!')

print(string_kebab)

Output

string-case

flat

Convert string to 'flat case' string

flat(string: str = "", replaceSeparator: Optional[str] = None) -> str:

Example

string_snake = "string_case"

string_flat = case.flat(string=string_snake)

print(string_flat)

Output

stringcase

Example

string_custom = "string!!case"

string_flat = case.flat(string=string_custom, replaceSeparator='!!')

print(string_flat)

Output

stringcase

raw

Convert string to 'raw case' string

raw(string: str = "", replaceSeparator: Optional[str] = None) -> str:

Example

string_snake = "string_case"

string_raw = case.raw(string=string_snake)

print(string_raw)

Output

string case

Example

string_custom = "string!!case"

string_raw = case.raw(string=string_custom, replaceSeparator='!!')

print(string_raw)

Output

string case

path

Convert string to 'path' string

path(string: str = "", replaceSeparator: Optional[str] = None) -> str:

Example

string_snake = "string_case"

string_path = case.path(string=string_snake)

print(string_path)

Output

string/case

Example

string_custom = "string!!case"

string_path = case.path(string=string_custom, replaceSeparator='!!')

print(string_path)

Output

string/case

piped

Convert string to 'piped' string

piped(string: str = "", replaceSeparator: Optional[str] = None) -> str:

Example

string_snake = "string_case"

string_piped = case.piped(string=string_snake)

print(string_piped)

Output

string|case

Example

string_custom = "string!!case"

string_piped = case.piped(string=string_custom, replaceSeparator='!!')

print(string_piped)

Output

string|case

title

Convert string to 'title case' string

title(string: str = "", replaceSeparator: Optional[str] = None) -> str:

Example

string_snake = "string_case"

string_title = case.title(string=string_snake)

print(string_title)

Output

String Case

Example

string_custom = "string!!case"

string_title = case.title(string=string_custom, replaceSeparator='!!')

print(string_title)

Output

String Case

custom

Convert string to 'custom separator' string

custom(string: str = "", separator: str = "",replaceSeparator: Optional[str] = None) -> str:

Example

string_snake = "string_case"

string_custom = case.custom(string=string_snake, separator='<#>')

print(string_custom)

Output

string<#>case

Example

string_custom = "string!!case"

string_custom = case.custom(string=string_custom, separator='<#>', replaceSeparator='!!')

print(string_custom)

Output

string<#>case

custom_between

Convert string to 'custom between' list of strings

custom_between(string: str = "", open: str = "", close: Optional[str] = None, replaceSeparator: Optional[str] = None) -> list:

Example

string_snake = "string_case"

list_custom_between = case.custom_between(
  string=string_snake,
  open='<',
  close='>'
)

print(list_custom_between)

Output

['<string>', '<case>']

Example

string_custom = "string!!case"

list_custom_between = case.custom_between(
  string=string_custom,
  open='<',
  close='>',
  replaceSeparator='!!'
)

print(list_custom_between)

Output

['<string>', '<case>']

sentence

Convert string to 'sentence case' string or list of strings

sentence(string: str = "", listMode: bool = False, capitalize: bool = False, upper: bool = False, replaceSeparator: Optional[str] = None) -> Union[str, list]:

Example

string_snake = "string_case"

string_sentence = case.sentence(string=string_snake)

print(string_sentence)

Output

String case

Example

string_snake = "string_case"

string_sentence_capitalize = case.sentence(string=string_snake, capitalize=True)

print(string_sentence_capitalize)

Output

String Case

Example

string_snake = "string_case"

string_sentence_upper = case.sentence(string=string_snake, upper=True)

print(string_sentence_upper)

Output

STRING CASE

Example

string_snake = "string_case"

list_sentence = case.sentence(string=string_snake, listMode=True)

print(list_sentence)

Output

['String', 'case']

Release files for super-case-converter-2000 1.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for super-case-converter-2000 1.1.2
File Size Uploaded
super-case-converter-2000-1.1.2.tar.gz 8.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for super-case-converter-2000 1.1.2
File Interpreter ABI Platform
super_case_converter_2000-1.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 51.1 kB

Release files / super-case-converter-2000-1.1.2.tar.gz

Download URL super-case-converter-2000-1.1.2.tar.gz
Size 8.9 kB
Tags Source
SHA-256 checksum
How to use checksums
3e429c85b02963507477b2edd548bb972e6d93ecdfc60ef6158fbb09a489c6c1
BLAKE2b-256 checksum
How to use checksums
04e023b6c764c0afd13b247b349be4d2ef49002d26cc709231dcf9786c8bc335
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.7.3

Release files / super_case_converter_2000-1.1.2-py3-none-any.whl

Download URL super_case_converter_2000-1.1.2-py3-none-any.whl
Size 42.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ee9d4a4dcfa168030259acf97dca7c2b4b7f46b02229ebe89d8f15bfd17d7581
BLAKE2b-256 checksum
How to use checksums
086b2196800d4020acabdd2279a0604e6d61bb265e86b453a6d836c17f49a0af
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.7.3

Release history Release notifications | RSS feed

This release

1.1.2 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page