(string) delimiterize (delimiter, asVendorPrefix)
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:
- 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"