camelCaseToDash() public static method

Method to convert the string from camelCase to dash format
public static camelCaseToDash ( string $string ) : string
$string string
return string
Esempio n. 1
0
 public function testString()
 {
     $this->assertEquals('hello-world', String::camelCaseToDash('HelloWorld'));
     $this->assertEquals('hello_world', String::camelCaseToUnderscore('HelloWorld'));
     $this->assertEquals('helloWorld', String::dashToCamelCase('hello-world'));
     $this->assertEquals('hello_world', String::dashToUnderscore('hello-world'));
 }