Skip to main content

Easy casing nomenclatures management such as camelCase, snake_case and many others!

Project description

This project aim to manage automatically you casing names of variables.

Usage

There is 3 functions that you save you time:

casing.analyse will parse your string.

>>> casing.analyze("stringToDetect")
>>> ['string', 'to', 'detect']

casing.transform will transform a string or a list into a casing.

>>> casing.transform("stringToDetect", case="snake")
>>> "string_to_detect"
>>> casing.transform(['string', 'to', 'detect'], case="snake")
>>> "string_to_detect"

casing.detect will detect the casing of a string.

>>> casing.detect("string_to_detect")
>>> "snake"

Options

You can switch between all this cases:

attachedcase: stringtodetect attacheduppercase: STRINGTODETECT camelcase: stringToDetect dashcase: string-to-detect dashuppercase: STRING-TO-DETECT normalcase: string to detect normaluppercase: STRING TO DETECT pascalcase: StringToDetect prettycase: String To Detect reversedcase: string To Detect sentencecase: String to detect snakecase: string_to_detect snakeuppercase: STRING_TO_DETECT

Project details


Download files

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

Source Distribution

casing-1.0.6.tar.gz (3.7 kB view hashes)

Uploaded Source

Supported by

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