Languages
[Edit]
EN

Programming - kebab-case definition with example

7 points
Created by:
Root-ssh
116000

In this article, we would like to explain the concept of the kebab-case naming style.

Example:

kebab-case-name-example

SCREAM-KEBAB-EXAMPLE

The main idea is to:

  1. combine words by replacing each space with a dash ("-")
  2. all letters should be in lowercase or uppercase
  3. if you use all uppercase letters in a variable with the kebab-case convention, it's known as a scream kebab.

Other examples:

Input (regular text)     Output (in kebab-case)
--------------------     --------------------

This is example text     this-is-example-text

HTML content             html-content

main HTML content        main-html-content

E-book                   e-book

new HTTP APR library     new-http-apr-library

Scream kebab             SCREAM-KEBAB

See also

  1. Programming - Case Styles

References

  1. PascalCase - Wikipedia

 

See also

  1. Programming - Case Styles

References

  1. Naming convention (programming) - Delimiter-separated words - Wikipedia

Programming - Case Styles

Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

â€ïžđŸ’» 🙂

Join