+ return string;
+ }
+
+ public static String dashSeparatedToCamelCaseString(String s) {
+ var parts = s.split("-");
+ return toCamelCaseString(Arrays.asList(parts));
+ }
+
+ private static String toCamelCaseString(List<String> strings) {
+ if (strings.isEmpty()) {
+ return "";
+ }
+ return strings.get(0) + strings.stream()
+ .skip(1)
+ .filter(s -> !s.isEmpty())
+ .map(s -> Character.toUpperCase(s.charAt(0)) + s.substring(1).toLowerCase(Locale.ROOT))
+ .collect(Collectors.joining());