Altax\Util\Str::studly PHP 메소드

studly() 공개 정적인 메소드

Convert a value to studly caps case.
public static studly ( string $value ) : string
$value string
리턴 string
    public static function studly($value)
    {
        $value = ucwords(str_replace(array('-', '_'), ' ', $value));
        return str_replace(' ', '', $value);
    }

Usage Example

예제 #1
0
 public function testStudly()
 {
     $this->assertEquals("AaaBbbCcc", Str::studly("aaa_bbb_ccc"));
 }