You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by GitBox <gi...@apache.org> on 2022/09/26 21:03:48 UTC

[GitHub] [commons-text] garydgregory commented on a diff in pull request #360: TEXT-217 - Add CaseUtils.toSnakeCase and CaseUtils.toKebabCase

garydgregory commented on code in PR #360:
URL: https://github.com/apache/commons-text/pull/360#discussion_r980501642


##########
src/main/java/org/apache/commons/text/CaseUtils.java:
##########
@@ -96,11 +96,100 @@ public static String toCamelCase(String str, final boolean capitalizeFirstLetter
         return new String(newCodePoints, 0, outOffset);
     }
 
+    private static String toDelimiterCase(String str, final char newDelimiter, final char... delimiters) {
+        if (StringUtils.isEmpty(str)) {
+            return str;
+        }
+        str = str.toLowerCase();
+        final int strLen = str.length();
+        final int[] newCodePoints = new int[strLen];

Review Comment:
   The number of code points might not the same as the number of chars.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@commons.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org