The Cusp of Helix

Intact Case リファレンス
[delimiterize]

(string) delimiterize (delimiter = '_', as_vendor_prefix = false)

camelCase や StudlyCaps の文字列を、区切り子表記 に変換します。

Parameters:

nametypedefaultcaption
delimiterstring'_'Concatenate tokens with between delimiter.
asVendorPrefixbooleanfalseTreat as vendor-prefix (CSS).

Returns:

  • (string) — Delimiterized string.

Author:

  • StewEucen

Since:

  • Version 1.0.0

Aliases:

  • snake_case
  • underscored

Examples:

"camelCase".delimiterize() #=> "camel_case" "StudlyCaps".delimiterize('_', true) #=> "_studly_caps" "chainCase".delimiterize('-') #=> "chain-case" "getUTCDay".delimiterize() #=> "get_utc__day" "UIView".delimiterize() #=> "ui__view" "XML_HTMLRequest".delimiterize() #=> "xml__html__request"