From b8ee85038e1d42503a4359d6476595181b7afe38 Mon Sep 17 00:00:00 2001 From: Laria Carolin Chabowski Date: Thu, 2 Aug 2018 17:05:57 +0200 Subject: Initial commit --- src/me/laria/code/idea_caseconv/DashCaseAction.java | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 src/me/laria/code/idea_caseconv/DashCaseAction.java (limited to 'src/me/laria/code/idea_caseconv/DashCaseAction.java') diff --git a/src/me/laria/code/idea_caseconv/DashCaseAction.java b/src/me/laria/code/idea_caseconv/DashCaseAction.java new file mode 100644 index 0000000..5e030ab --- /dev/null +++ b/src/me/laria/code/idea_caseconv/DashCaseAction.java @@ -0,0 +1,10 @@ +package me.laria.code.idea_caseconv; + +import java.util.Optional; + +public class DashCaseAction extends SelectionReplacerAction { + @Override + protected String replace(String s) { + return WordSplitConverter.convert(s, "-", (i, s1) -> Optional.of(s1.toLowerCase())); + } +} -- cgit v1.2.3-54-g00ecf