The Cusp of Helix

Intact Case リファレンス
[compound]

(string) compound ($haystack, [$delimiter = '_'])

複数の単語を連結して複合語を生成します。

Parameters:

nametypedefaultcaption
$haystackstringString to Convert.
$delimiterstring'_'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"