krasa / StringManipulation

IntelliJ plugin - https://plugins.jetbrains.com/plugin/2162
Apache License 2.0
698 stars 81 forks source link

Capitalize Words drops period within initials #134

Closed nezda closed 3 years ago

nezda commented 3 years ago

Capitalize Words drops period within initials.

To Reproduce Steps to reproduce the behavior:

  1. select text DAVID W.T. BROWN
  2. String Manipulation > Switch case... > Capitalized Words / camelCase
  3. selected text becomes David W T. Brown

Expected behavior Selected text to become David W.T. Brown (retaining both periods).

Environment :

IntelliJ IDEA 2021.1 (Ultimate Edition) Build #IU-211.6693.111, built on April 6, 2021 Runtime version: 11.0.10+9-b1341.35 x86_64 VM: Dynamic Code Evolution 64-Bit Server VM by JetBrains s.r.o. macOS 11.2.1 GC: G1 Young Generation, G1 Old Generation Memory: 30728M Cores: 16 Registry: search.everywhere.settings=true, debugger.watches.in.variables=false Non-Bundled Plugins: YAML/Ansible support (0.11.2), ideanginx9 (0.1.9), net.seesharpsoft.intellij.plugins.csv (2.15.1), org.jetbrains.plugins.rest (211.6693.44), name.kropp.intellij.makefile (211.6693.108), com.intellij.kubernetes (211.6693.108), JFlex Support (1.5.1), JOL (1.9.0), String Manipulation (8.14.203.000.0), StringToolsPlugin (4.0), com.egoshard.intellij.k8s-runtime-config-plugin (1.2.6), org.jetbrains.plugins.hocon (2020.1.0), com.dmarcotte.handlebars (211.6693.44), org.intellij.scala (2021.1.16), Pythonid (211.6693.115), ru.meanmail.plugin.requirements (2021.3-211), mobi.hsz.idea.gitignore (4.0.4) Kotlin: 211-1.4.32-release-IJ6693.72

krasa commented 3 years ago

That action is for a universal switching, e.g from dot.case, snake-case, which makes it bad for other uses.

But Capitalize action should now do the job.
You can try it: StringManipulation.zip