Method to convert the string from camelCase to dash format
public static camelCaseToDash ( string $string ) : string | ||
$string | string | |
return | string |
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')); }