(string) compound ($haystack, [$delimiter = '_'])
複数の単語を連結して複合語を生成します。
Parameters:
name | type | default | caption |
---|---|---|---|
$haystack | string | String to Convert. | |
$delimiter | string | '_' | Delimiter. |
Returns:
- (string) — Compound words.
Author:
- StewEucen
Since:
- Version 1.0.0
Examples:
use StewEucen\Acts\IntactCase
IntactCase::compound(['camel', 'Case']) //=> "camelCase"
IntactCase::compound(['Studly', 'Caps']) //=> "StudlyCaps"
IntactCase::compound(['XML', 'HTML', 'Request']) //=> "XML_HTMLRequest"
IntactCase::compound(['get', 'utc_', 'day']) //=> "get_utc__day"
IntactCase::compound(['', 'webkit', 'flex'], '-') //=> "-webkit-flex"