From: Markus Scherer Date: Mon, 12 Feb 2018 23:52:55 +0000 (+0000) Subject: ICU-13248 remove UCharacter.toTitleFirst() X-Git-Tag: release-61-rc~103 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=64fd53cd95fad3c8909142986c930d2002914d80;p=icu ICU-13248 remove UCharacter.toTitleFirst() X-SVN-Rev: 40900 --- diff --git a/icu4j/main/classes/core/src/com/ibm/icu/lang/UCharacter.java b/icu4j/main/classes/core/src/com/ibm/icu/lang/UCharacter.java index be1545a1451..9580c9fe10f 100644 --- a/icu4j/main/classes/core/src/com/ibm/icu/lang/UCharacter.java +++ b/icu4j/main/classes/core/src/com/ibm/icu/lang/UCharacter.java @@ -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. - *

Examples: - * - * - * - * - * - * - * - * - *
SourceResultLocale
anglo-American localeAnglo-American locale
“contact us”“Contact us”
49ers win!49ers win!
丰(abc)丰(abc)
«ijs»«Ijs»
«ijs»«IJs»nl-BE
«ijs»«İjs»tr-DE
- * @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}

Returns the titlecase version of the argument string. *

Position for titlecasing is determined by the argument break