The Cusp of Helix

Reference of Intact Case
[delimiterize]

(string) delimiterize (delimiter, asVendorPrefix)

Convert compound words connected by a delimiter from 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:

  • toSnakeCase
  • to_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"