|
|
@ -190,7 +190,8 @@ std::string UnderscoresToCamelCase(const std::string& input, |
|
|
|
// start with a digit.
|
|
|
|
// start with a digit.
|
|
|
|
// Note: not preserving leading underscores for all otherwise valid identifiers
|
|
|
|
// Note: not preserving leading underscores for all otherwise valid identifiers
|
|
|
|
// so as to not break anything that relies on the existing behaviour
|
|
|
|
// so as to not break anything that relies on the existing behaviour
|
|
|
|
if (result.size() > 0 && ('0' <= result[0] && result[0] <= '9') && input.size() > 0 && input[0] == '_') |
|
|
|
if (result.size() > 0 && ('0' <= result[0] && result[0] <= '9') |
|
|
|
|
|
|
|
&& input.size() > 0 && input[0] == '_') |
|
|
|
{ |
|
|
|
{ |
|
|
|
result.insert(0, 1, '_'); |
|
|
|
result.insert(0, 1, '_'); |
|
|
|
} |
|
|
|
} |
|
|
|