aboutsummaryrefslogtreecommitdiff
path: root/src/me/laria/code
diff options
context:
space:
mode:
Diffstat (limited to 'src/me/laria/code')
-rw-r--r--src/me/laria/code/idea_caseconv/TitleCaseAction.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/me/laria/code/idea_caseconv/TitleCaseAction.java b/src/me/laria/code/idea_caseconv/TitleCaseAction.java
new file mode 100644
index 0000000..70024c3
--- /dev/null
+++ b/src/me/laria/code/idea_caseconv/TitleCaseAction.java
@@ -0,0 +1,10 @@
+package me.laria.code.idea_caseconv;
+
+import java.util.Optional;
+
+public class TitleCaseAction extends SelectionReplacerAction {
+ @Override
+ protected String replace(String s) {
+ return WordSplitConverter.convert(s, " ", (i, part) -> Optional.of(CamelCaseAction.ucfirst(part)));
+ }
+}