XhmikosR / notepad2-mod

LOOKING FOR DEVELOPERS - Notepad2-mod, a Notepad2 fork, a fast and light-weight Notepad-like text editor with syntax highlighting
https://xhmikosr.github.io/notepad2-mod/
Other
1.45k stars 270 forks source link

"Title Case" option doesn't work? #35

Open ghost opened 11 years ago

ghost commented 11 years ago

"Title Case" option doesn't work after applying "Upper Case" option.

Steps to reproduce:

  1. put some text
  2. apply "Edit->Convert->Upper Case" option (works fine)
  3. apply "Edit->Convert->Title Case" option (doesn't work)

Notepad2-mod (64-bit) 4.2.25 r823 (f4bfacf)

Hugo-KTM commented 8 years ago

Edit ▷ Convert ▷ Title Case (Ctrl+Alt+I) does not work for upper case words.

Input: TEST TEXT

Result: TEST TEXT

Expected Result: Test Text

Steps to reproduce:

  1. type text in upper case
  2. select upper case text
  3. apply Edit ▷ Convert ▷ Title Case (Ctrl+Alt+I)

Notepad2-mod (64-bit) 4.2.25 r972 (68b1190)

gwarser commented 8 years ago

System/library limitation/design?

Converts the specified string to title case (except for words that are entirely in uppercase, which are considered to be acronyms).

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.

https://msdn.microsoft.com/en-us/library/windows/desktop/dd318700(v=vs.85).aspx https://blogs.msdn.microsoft.com/shawnste/2009/08/18/what-is-title-case/ http://stackoverflow.com/questions/1206019/converting-string-to-title-case-in-c-sharp https://msdn.microsoft.com/en-us/library/system.globalization.textinfo.totitlecase(v=vs.110).aspx