$underscore_string = "hello_world"; $camel_case_string = t3lib_div::underscoredToUpperCamelCase($underscore_string); echo $camel_case_string;
$underscore_string = "this_is_an_example_of_upper_camel_case"; $camel_case_string = t3lib_div::underscoredToUpperCamelCase($underscore_string); echo $camel_case_string;Output: "ThisIsAnExampleOfUpperCamelCase" In this example, a longer string "this_is_an_example_of_upper_camel_case" is passed to the same function. The function converts the string to "ThisIsAnExampleOfUpperCamelCase" according to the upper camel case naming convention. Overall, this function is particularly useful in the development of TYPO3 CMS extensions, where naming conventions must be followed consistently.