ProgerXP / Notepad2e

Word highlighting, simultaneous editing, split views, math evaluation, un/grep, comment reformatting, UAC elevation, complete regexps (PCRE), Lua lexers, DPI awareness and more (XP+)
Other
376 stars 52 forks source link

Title case not always converting the case #192

Open ProgerXP opened 6 years ago

ProgerXP commented 6 years ago

This is inherited behaviour of Notepad2: select AAA, Ctrl+Alt+I - result is the same but do the same on AaAa - result would be Aaaa.

Why this exception with all-uppercase words?

cshnik commented 6 years ago

It looks like specified behavior is an algorithm's feature of title case transformation: under specific conditions upper case letters can be treated as acronyms:

ToTitleCase() takes a very simple approach to title casing. Maybe in the future it'll be smarter, but for now it just uppercases the first letter in a group of letters, and tries to pay attention to non-letters and word breaks. It also tries to keep acronyms all upper-case.

Please check this article for details: What is Title Case?