The Cusp of Helix

Intact Case リファレンス
[hyphenaged]

(string) hyphenaged (as_vendor_prefix = false)

camelCase や StudlyCaps の文字列を、ハイフン区切り記法に変換します。

Parameters:

nametypedefaultcaption
asVendorPrefixbooleanfalseTreat as vendor-prefix (CSS).

Returns:

  • (string) — Hyphenaged String.

Author:

  • StewEucen

Since:

  • Version 1.0.0

Aliases:

  • train_case
  • chain_case
  • kebab_case
  • spinal_case

Examples:

"chainCase".hyphenaged() #=> "chain-case" "VendorPrefix".hyphenaged(true) #=> "-vendor-prefix" "camelCase".hyphenaged(true) #=> "camel-case"