(string) studlyCaps ($haystack, [$delimiter = '_'])
snake_case や train-case など、区切り子表記された複合語の文字列を StudlyCaps に変換します。
Parameters:
name | type | default | caption |
---|---|---|---|
$haystack | string | String to Convert. | |
$delimiter | string | '_' | Delimiter. |
Returns:
- (string) — StudlyCaps string.
Author:
- StewEucen
Since:
- Version 1.0.0
Aliases:
- pascalCase
- PascalCase
Examples:
use StewEucen\Acts\IntactCase
IntactCase::studlyCaps('snake_case') //=> "SnakeCase"
IntactCase::studlyCaps('get_utc__day') //=> "GetUTCDay"
IntactCase::studlyCaps('ui__view') //=> "UIView"
IntactCase::studlyCaps('xml__html__request') //=> "XML_HTMLRequest"