akalongman / akalongman/sublimetext-stringutilities

Regarding Underscores conversion and uppercase characters

Đang mở
#32 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Python
Star
83
Fork
23
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

As it stands, converting from Underscores to either camelCase or PascalCase requires only an underscore somewhere in the selection, and for the first character to be lowercase. The current implementation cannot handle strings like `a_LL_pointer`, turning them into `aLlPointer` or `ALlPointer`. What behavior should there be when handling Underscored strings with uppercase letters in these converters? Should the conversion try to support and preserve acronyms (i.e. multiple uppercase characters in a row with at least one underscore before or after)? In light of this, does the requirement for the first letter to be lowercase even make sense? The logic for handling these sorts of cases correctly seems a bit tricky...

An issue remains that the original underscored form wouldn't be discernible from the converted form (e.g. `ALLPointer` couldn't tell us if we want `al_l_pointer` or `a_ll_pointer`, which is even disregarding capitalization). Given this limitation, should attempts be made to modify the behavior of Underscores-> conversion to support strings with capital letters even if camelCase/PascalCase-> conversion cannot reasonably reverse the transformation?

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.