function checklistapi_strtolowercamel in Checklist API 8
Same name and namespace in other branches
- 7 checklistapi.module \checklistapi_strtolowercamel()
Converts a string to lowerCamel case, suitably for a class property name.
Parameters
string $string: The input string.
Return value
string The input string converted to camelCase.
2 calls to checklistapi_strtolowercamel()
- ChecklistapiChecklist::__construct in src/
ChecklistapiChecklist.php - Constructs a ChecklistapiChecklist object.
- ChecklistapiModuleTest::testChecklistapiStrtolowercamel in tests/
src/ Unit/ ChecklistapiModuleTest.php - Tests checklistapi_strtolowercamel().
File
- ./
checklistapi.module, line 214 - An API for creating fillable, persistent checklists.
Code
function checklistapi_strtolowercamel($string) {
$string = str_replace('_', ' ', $string);
$string = ucwords($string);
$string = str_replace(' ', '', $string);
$string = Unicode::lcfirst($string);
return $string;
}