elminson / stringprocessor
StringProcessor
v1.0
2018-10-11 00:18 UTC
Requires
- phpunit/phpunit: ^7.4@dev
Requires (Dev)
- phpunit/phpunit: ^7.4@dev
This package is auto-updated.
Last update: 2026-03-11 18:40:04 UTC
README
#StringProcessor
Complete the method/function so that it converts dash/underscore delimited words into camel casing. The first word within the output should be capitalized only if the original word was capitalized.
Examples
toCamelCase("the-stealth-warrior"); // returns "theStealthWarrior" toCamelCase("The_Stealth_Warrior"); // returns "TheStealthWarrior"
Use
$stringprocessor = new StringProcessor(); $result=$stringprocessor->toCamelCase("hello_world")); //$result ==> helloWorld