Different Types Of Cases Used In Programming

Some commonly used cases used in programming.

Flat Case

Also known as: lazy case, mumble case.

All characters are lower case and all words are not separated.

Examples:

flatcase
word
multiplewordsputtogether

 

Upper Flat Case

Also known as: screaming case.

All characters are upper case and all words are not separated.

Examples:

UPPERFLATCASE
WORD
MULTIPLEWORDSPUTTOGETHER

 

Kebab Case

Also known as: dash case, hyphen case, caterpillar case, spinal case, param case, lisp case, CSS case.

All characters are lower case and all words are separated by a hyphen.

Examples:

kebab-case
word
multiple-words-put-together

 

Screaming Kebab Case

Also known as: upper dash case, upper hyphen case.

All characters are lower case and all words are separated by a hyphen.

Examples:

SCREAMING-KEBAB-CASE
WORD
MULTIPLE-WORDS-PUT-TOGETHER

 

Pascal Case

Also known as: Capital camel case, Upper camel case.

All words start with an upper case character and there is no separation between words. Abbreviations and acronyms have the first letter capitalised only.

Examples:

PascalCase
Word
MultipleWordsPutTogether
AmountOfCo2

 

Camel Case

Also known as: dromedary case.

Starts with a lower case letter and words are separated by an upper case character.

Examples:

camelCase
word
multipleWordsPutTogether

This includes "hungarian notation" where a datatype is prefixed to the parameter. In this case only the datatype is fully lower-cased. For example:

intCamelCase
strWord
floatMultipleWordsPutTogether

 

Snake Case

All words start with an upper case character and all words are separated by an underscore.

Examples:

Snake_Case
Word
Multiple_Words_Put_Together

 

Camel Snake Case

Starts with a lowercase letter, all words start with an upper case and are separated by an underscore.

Examples:

camel_Snake_Case
word
multiple_Words_Put_Together

 

Constant Case

Also known as: upper case, screaming case, upper snake case, screaming snake case.

All characters are upper case and all words are separated by an underscore.

Examples:

CONSTANT_CASE
WORD
MULTIPLE_WORDS_PUT_TOGETHER

 

Add new comment

The content of this field is kept private and will not be shown publicly.