(string) delimiterize (delimiter = '_', as_vendor_prefix = false)
Convert compound words connected by a delimiter from camelCase/StudlyCaps.
Parameters:
name | type | default | caption |
---|---|---|---|
delimiter | string | '_' | Concatenate tokens with between delimiter. |
asVendorPrefix | boolean | false | Treat 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"