Github user chtompki commented on a diff in the pull request:

    https://github.com/apache/commons-text/pull/46#discussion_r121380270
  
    --- Diff: src/main/java/org/apache/commons/text/CaseUtils.java ---
    @@ -0,0 +1,140 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one or more
    + * contributor license agreements.  See the NOTICE file distributed with
    + * this work for additional information regarding copyright ownership.
    + * The ASF licenses this file to You under the Apache License, Version 2.0
    + * (the "License"); you may not use this file except in compliance with
    + * the License.  You may obtain a copy of the License at
    + *
    + *      http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +package org.apache.commons.text;
    +
    +import org.apache.commons.lang3.StringUtils;
    +
    +import java.util.HashSet;
    +import java.util.Set;
    +
    +/**
    + * <p>Case manipulation operations on Strings that contain words.</p>
    + *
    + * <p>This class tries to handle <code>null</code> input gracefully.
    + * An exception will not be thrown for a <code>null</code> input.
    + * Each method documents its behaviour in more detail.</p>
    + *
    + * @since 1.0
    + */
    +public class CaseUtils {
    +
    +    /**
    +     * <p><code>CaseUtils</code> instances should NOT be constructed in
    +     * standard programming. Instead, the class should be used as
    +     * <code>CaseUtils.toCamelCase("foo bar", true, new 
char[]{'-'});</code>.</p>
    +     * <p>
    +     * <p>This constructor is public to permit tools that require a 
JavaBean
    +     * instance to operate.</p>
    +     */
    +    public CaseUtils() {
    +        super();
    +    }
    +
    +    // Camel Case
    +    
//-----------------------------------------------------------------------
    +    /**
    +     * <p>Converts all the delimiter separated words in a String into 
camelCase,
    +     * that is each word is made up of a titlecase character and then a 
series of
    +     * lowercase characters. The  </p>
    +     *
    +     * <p>The delimiters represent a set of characters understood to 
separate words.
    +     * The first non-delimiter character after a delimiter will be 
capitalized. The first String
    +     * character may or may not be capitalized and it's determined by the 
user input for capitalizeFirstLetter
    +     * variable.</p>
    +     *
    +     * <p>A <code>null</code> input String returns <code>null</code>.
    +     * Capitalization uses the Unicode title case, normally equivalent to
    +     * upper case.</p>
    +     *
    --- End diff --
    
    I wonder if, like in 
[`Character.toUpperCase`](https://docs.oracle.com/javase/8/docs/api/java/lang/Character.html#toUpperCase-char-),
 we should document that we are not locale based which I support. Adding in 
`Locale` to the mix throws added complexity that may not be needed. Or document 
that we're relying on `Character.toTitleCase` which has no `Locale` based 
analogue in `String`.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org

Reply via email to