The Cusp of Helix

Intact Case リファレンス
[camelize]

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

snake_case や train-case など、区切り子表記された複合語の文字列を camelCase に変換します。

Parameters:

nametypedefaultcaption
$haystackstringString to Convert.
$delimiterstring'_'Delimiter.

Returns:

  • (string) — camelCase string.

Author:

  • StewEucen

Since:

  • Version 1.0.0

Aliases:

  • camelCase
  • nerdCaps

Examples:

use StewEucen\Acts\IntactCase IntactCase::camelize('snake_case') //=> "snakeCase" IntactCase::camelize('get_utc__day') //=> "getUTCDay" IntactCase::camelize('ui__view') //=> "ui_View" IntactCase::camelize('xml__html__request') //=> "xml_HTMLRequest"