]> granicus.if.org Git - icu/commitdiff
ICU-13248 remove UCharacter.toTitleFirst()
authorMarkus Scherer <markus.icu@gmail.com>
Mon, 12 Feb 2018 23:52:55 +0000 (23:52 +0000)
committerMarkus Scherer <markus.icu@gmail.com>
Mon, 12 Feb 2018 23:52:55 +0000 (23:52 +0000)
X-SVN-Rev: 40900

icu4j/main/classes/core/src/com/ibm/icu/lang/UCharacter.java

index be1545a14517852eb51b4ca0a0c82eeb25642556..9580c9fe10f1aa80cf96ed3c7caa391a338363e0 100644 (file)
@@ -5123,37 +5123,6 @@ public final class UCharacter implements ECharacterCategory, ECharacterDirection
         return CaseMapImpl.toTitle(getCaseLocale(locale), options, titleIter, str);
     }
 
-    /**
-     * Return a string with just the first word titlecased, for menus and UI, etc. This does not affect most of the string,
-     * and sometimes has no effect at all; the original string is returned whenever casing
-     * would not be appropriate for the first word (such as for CJK characters or initial numbers).
-     * Initial non-letters are skipped in order to find the character to change.
-     * Characters past the first affected are left untouched: see also TITLECASE_NO_LOWERCASE.
-     * <p>Examples:
-     * <table border='1'><tr><th>Source</th><th>Result</th><th>Locale</th></tr>
-     * <tr><td>anglo-American locale</td><td>Anglo-American locale</td></tr>
-     * <tr><td>“contact us”</td><td>“Contact us”</td></tr>
-     * <tr><td>49ers win!</td><td>49ers win!</td></tr>
-     * <tr><td>丰(abc)</td><td>丰(abc)</td></tr>
-     * <tr><td>«ijs»</td><td>«Ijs»</td></tr>
-     * <tr><td>«ijs»</td><td>«IJs»</td><td>nl-BE</td></tr>
-     * <tr><td>«ijs»</td><td>«İjs»</td><td>tr-DE</td></tr>
-     * </table>
-     * @param locale the locale for accessing exceptional behavior (eg for tr).
-     * @param str the source string to change
-     * @return the modified string, or the original if no modifications were necessary.
-     * @internal
-     * @deprecated ICU internal only
-     */
-    @Deprecated
-    public static String toTitleFirst(ULocale locale, String str) {
-        // TODO: Remove this function. Inline it where it is called in CLDR.
-        return TO_TITLE_WHOLE_STRING_NO_LOWERCASE.apply(locale.toLocale(), null, str);
-    }
-
-    private static final com.ibm.icu.text.CaseMap.Title TO_TITLE_WHOLE_STRING_NO_LOWERCASE =
-            com.ibm.icu.text.CaseMap.toTitle().wholeString().noLowercase();
-
     /**
      * {@icu} <p>Returns the titlecase version of the argument string.
      * <p>Position for titlecasing is determined by the argument break