elminson/stringprocessor

StringProcessor

v1.0 2018-10-11 00:18 UTC

This package is auto-updated.

Last update: 2024-11-11 15:40:35 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