How can I modify a string in the following ways?
- first character uppercase
- first character after the hyphen uppercase
- first character after the slash uppercase
Here are some examples:
$a = 'foo-bar';
echo $a; // FooBar
$a = 'my-class-name';
echo $a; // MyClassName
$a = 'my-directory/my-class-name';
echo $a; // MyDirectory/MyClassName
$a = 'my-directory/my/sub/directory/my-class-name';
echo $a; // MyDirectory/My/Sub/Directory/MyClassName