akalongman / sublimetext-stringutilities

Sublime Text 2/3 plugin for string manipulations
MIT License
83 stars 24 forks source link

fixes to enforce camelCase and PascalCase constraints in each converter #30

Closed jfsawin closed 7 years ago

jfsawin commented 7 years ago

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.