Update `convertToCamelCase` function to ignore underscores at start/end
What does this MR do?
Updates the convertToCamelCase utility function to ignore leading and trailing underscores.
Some examples of before (original implementation) vs after (new implementation):
// Before: "aSnakeCasedString"
// After: "aSnakeCasedString" (no change)
convertToCamelCase('a_snake_cased_string')
// Before: "LeadingUnderscore"
// After: "_leadingUnderscore"
convertToCamelCase('_leading_underscore')
// Before: "_leadingUnderscores"
// After: "__leadingUnderscores"
convertToCamelCase('__leading_underscores')
// Before: "trailingUnderscore_"
// After: "trailingUnderscore_" (no change)
convertToCamelCase('trailing_underscore_')
// Before: "trailingUnderscores_"
// After: "trailingUnderscores__"
convertToCamelCase('trailing_underscores__')
This MR also updates code that was relying on the old behavior.
Closes #207853 (closed)
Edited by Nathan Friend