The CaSeS for CASE
Different text cases are used in various contexts such as programming, writing, and branding. Understanding each case will help you choose the appropriate one for your needs.
Different text cases are used in various contexts such as programming, writing, and branding. Understanding each case will help you choose the appropriate one for your needs.
This article acts primarily as a cheat sheet for me to use during the workday and such.
Name | Example | When to Use |
---|---|---|
Snake Case | snake_case |
Common in Python for variable and function names |
Screaming Snake Case | SCREAMING_SNAKE_CASE |
Constants in Python and Rust |
Camel Case | camelCase |
Common in other programming languages for variables |
Pascal Case | PascalCase |
Classes in Python, Rust and other OOP languages |
Lower Case | lowercase |
SQL for keywords, general programming |
Upper Case | UPPERCASE |
SQL for emphasis on SQL commands, constants in programming |
Kebab Case | kebab-case |
Rare in programming, used in URLs and web development |
Constant Case | CONSTANT_CASE |
Constants in programming, similar to screaming snake case |
Train Case | Train-Case |
Non-standard, similar to kebab case with capital letters |
Dot Case | dot.case |
Configurations and properties files |
Camel Snake Case | camel_Snake_Case |
Rare, hybrid use cases in programming |
Pascal Snake Case | Pascal_Snake_Case |
Rare, hybrid use cases in programming |
Path Case | path/case |
File paths and URLs |
Title Case | Title Case |
Document titles and headers |
Sentence Case | Sentence case |
Comments and documentation in code |
Screaming Kebab Case | SCREAMING-KEBAB-CASE |
Rarely used, could be for emphatic URL components |
Flat Case | flatcase |
Rarely used, can be for system-specific naming schemes |
No Case | nocase |
Rarely used, specific system identifiers |
Sponge Case | sPoNgEcAsE |
Non-standard, often used humorously or in memes |