In the existing implementation, PascalCase<->Underscores will happily also convert camelCase->Underscores. Similarly, camelCase<->Underscores will convert PascalCase->Underscores.
With these changes, StringsLikeThis will no longer be converted with camelCase<->Underscores, and stringsLikeThis will no longer be converted with PascalCase->Underscores.
This patch also fixes one other small bug with Underscores->camelCase conversion, where every odd word after the first would remain lowercase in camelCase form. this_is_a_very_long_underscored_string now converts to thisIsAVeryLongUnderscoredString as it should, instead of thisIsaVerylongUnderscoredstring as it would before.
In the existing implementation, PascalCase<->Underscores will happily also convert camelCase->Underscores. Similarly, camelCase<->Underscores will convert PascalCase->Underscores.
With these changes,
StringsLikeThis
will no longer be converted with camelCase<->Underscores, andstringsLikeThis
will no longer be converted with PascalCase->Underscores.This patch also fixes one other small bug with Underscores->camelCase conversion, where every odd word after the first would remain lowercase in camelCase form.
this_is_a_very_long_underscored_string
now converts tothisIsAVeryLongUnderscoredString
as it should, instead ofthisIsaVerylongUnderscoredstring
as it would before.