| Modifier and Type | Class and Description |
|---|---|
| public static class | CaseMap.Fold
Case folding options and methods. |
| public static class | CaseMap.Lower
Lowercasing options and methods. |
| public static class | CaseMap.Title
Titlecasing options and methods. |
| public static class | CaseMap.Upper
Uppercasing options and methods. |
| Modifier and Type | Field and Description |
|---|---|
| protected int | internalOptions
Deprecated
This API is ICU internal only.
|
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static CaseMap. | |
| private static int | |
| public abstract CaseMap | Returns: an options object with this option.Returns an instance that behaves like this one but
omits unchanged text when case-mapping with |
| public static CaseMap. | |
| public static CaseMap. | |
| public static CaseMap. |
| internalOptions | back to summary |
|---|---|
| protected int internalOptions
Deprecated This API is ICU internal only.
| |
| CaseMap | back to summary |
|---|---|
| private CaseMap(int opt) | |
| fold | back to summary |
|---|---|
| public static CaseMap. | |
| getCaseLocale | back to summary |
|---|---|
| private static int getCaseLocale(Locale locale) | |
| omitUnchangedText | back to summary |
|---|---|
| public abstract CaseMap omitUnchangedText() Returns an instance that behaves like this one but
omits unchanged text when case-mapping with | |
| toLower | back to summary |
|---|---|
| public static CaseMap. | |
| toTitle | back to summary |
|---|---|
| public static CaseMap. | |
| toUpper | back to summary |
|---|---|
| public static CaseMap. | |
| Modifier and Type | Field and Description |
|---|---|
| private static final CaseMap. | |
| private static final CaseMap. | |
| private static final CaseMap. | |
| private static final CaseMap. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public String | |
| public <A extends Appendable> A | Returns: dest with the result string (or only changes) appended.The original string. src, A A buffer for the result string. Must not be null. dest, Edits Records edits for index mapping, working with styled text,
and getting only changes (if any).
This function calls edits.reset() first. edits can be null. edits)Case-folds a string and optionally records edits (see |
| public CaseMap. | omitUnchangedText()
Implements abstract com. Edits.
|
| public CaseMap. | Returns: an options object with this option.Returns an instance that behaves like this one but handles dotted I and dotless i appropriately for Turkic languages (tr, az). |
| DEFAULT | back to summary |
|---|---|
| private static final CaseMap. | |
| OMIT_UNCHANGED | back to summary |
|---|---|
| private static final CaseMap. | |
| TURKIC | back to summary |
|---|---|
| private static final CaseMap. | |
| TURKIC_OMIT_UNCHANGED | back to summary |
|---|---|
| private static final CaseMap. | |
| Fold | back to summary |
|---|---|
| private Fold(int opt) | |
| apply | back to summary |
|---|---|
| public String apply(CharSequence src) Case-folds a string. The result may be longer or shorter than the original. Case-folding is locale-independent and not context-sensitive, but there is an option for whether to include or exclude mappings for dotted I and dotless i that are marked with 'T' in CaseFolding.txt.
| |
| apply | back to summary |
|---|---|
| public <A extends Appendable> A apply(CharSequence src, A dest, Edits edits) Case-folds a string and optionally records edits (see Case-folding is locale-independent and not context-sensitive, but there is an option for whether to include or exclude mappings for dotted I and dotless i that are marked with 'T' in CaseFolding.txt.
| |
| omitUnchangedText | back to summary |
|---|---|
| public CaseMap. Implements abstract com. Doc from com. Returns an instance that behaves like this one but
omits unchanged text when case-mapping with | |
| turkic | back to summary |
|---|---|
| public CaseMap. Returns an instance that behaves like this one but handles dotted I and dotless i appropriately for Turkic languages (tr, az). Uses the Unicode CaseFolding.txt mappings marked with 'T' that are to be excluded for default mappings and included for the Turkic-specific mappings.
| |
| Modifier and Type | Field and Description |
|---|---|
| private static final CaseMap. | |
| private static final CaseMap. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public String | Returns: the result string.The locale ID. Can be null for locale, CharSequence Locale#getDefault.
(See ULocale#toLocale.)The original string. src)Lowercases a string. |
| public <A extends Appendable> A | Returns: dest with the result string (or only changes) appended.The locale ID. Can be null for locale, CharSequence Locale#getDefault.
(See ULocale#toLocale.)The original string. src, A A buffer for the result string. Must not be null. dest, Edits Records edits for index mapping, working with styled text,
and getting only changes (if any).
This function calls edits.reset() first. edits can be null. edits)Lowercases a string and optionally records edits (see |
| public CaseMap. | omitUnchangedText()
Implements abstract com. Edits.
|
| DEFAULT | back to summary |
|---|---|
| private static final CaseMap. | |
| OMIT_UNCHANGED | back to summary |
|---|---|
| private static final CaseMap. | |
| Lower | back to summary |
|---|---|
| private Lower(int opt) | |
| apply | back to summary |
|---|---|
| public String apply(Locale locale, CharSequence src) Lowercases a string. Casing is locale-dependent and context-sensitive. The result may be longer or shorter than the original.
| |
| apply | back to summary |
|---|---|
| public <A extends Appendable> A apply(Locale locale, CharSequence src, A dest, Edits edits) Lowercases a string and optionally records edits (see
| |
| omitUnchangedText | back to summary |
|---|---|
| public CaseMap. Implements abstract com. Doc from com. Returns an instance that behaves like this one but
omits unchanged text when case-mapping with | |
| Modifier and Type | Field and Description |
|---|---|
| private static final CaseMap. | |
| private static final CaseMap. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public CaseMap. | Returns: an options object with this option.Returns an instance that behaves like this one but adjusts each titlecasing BreakIterator index to the next cased character. |
| public String | Returns: the result string.The locale ID. Can be null for locale, BreakIterator Locale#getDefault.
(See ULocale#toLocale.)A break iterator to find the first characters of words that are to be titlecased.
It is set to the source string (setText())
and used one or more times for iteration (first() and next()).
If null, then a word break iterator for the locale is used
(or something equivalent). iter, CharSequence The original string. src)Titlecases a string. |
| public <A extends Appendable> A | Returns: dest with the result string (or only changes) appended.The locale ID. Can be null for locale, BreakIterator Locale#getDefault.
(See ULocale#toLocale.)A break iterator to find the first characters of words that are to be titlecased.
It is set to the source string (setText())
and used one or more times for iteration (first() and next()).
If null, then a word break iterator for the locale is used
(or something equivalent). iter, CharSequence The original string. src, A A buffer for the result string. Must not be null. dest, Edits Records edits for index mapping, working with styled text,
and getting only changes (if any).
This function calls edits.reset() first. edits can be null. edits)Titlecases a string and optionally records edits (see |
| public CaseMap. | Returns: an options object with this option.Returns an instance that behaves like this one but does not adjust the titlecasing BreakIterator indexes; titlecases exactly the characters at breaks from the iterator. |
| public CaseMap. | Returns: an options object with this option.Returns an instance that behaves like this one but does not lowercase non-initial parts of words when titlecasing. |
| public CaseMap. | omitUnchangedText()
Implements abstract com. Edits.
|
| public CaseMap. | Returns: an options object with this option.Returns an instance that behaves like this one but titlecases sentences rather than words. |
| public CaseMap. | Returns: an options object with this option.Returns an instance that behaves like this one but titlecases the string as a whole rather than each word. |
| DEFAULT | back to summary |
|---|---|
| private static final CaseMap. | |
| OMIT_UNCHANGED | back to summary |
|---|---|
| private static final CaseMap. | |
| Title | back to summary |
|---|---|
| private Title(int opt) | |
| adjustToCased | back to summary |
|---|---|
| public CaseMap. Returns an instance that behaves like this one but adjusts each titlecasing BreakIterator index to the next cased character. (See the Unicode Standard, chapter 3, Default Case Conversion, R3 toTitlecase(X).) This used to be the default index adjustment in ICU. Since ICU 60, the default index adjustment is to the next character that is a letter, number, symbol, or private use code point. (Uncased modifier letters are skipped.) The difference in behavior is small for word titlecasing, but the new adjustment is much better for whole-string and sentence titlecasing: It yields "49ers" and "«丰(abc)»" instead of "49Ers" and "«丰(Abc)»". It is an error to specify multiple titlecasing adjustment options together.
| |
| apply | back to summary |
|---|---|
| public String apply(Locale locale, BreakIterator iter, CharSequence src) Titlecases a string. Casing is locale-dependent and context-sensitive. The result may be longer or shorter than the original. Titlecasing uses a break iterator to find the first characters of words that are to be titlecased. It titlecases those characters and lowercases all others. (This can be modified with options bits.)
| |
| apply | back to summary |
|---|---|
| public <A extends Appendable> A apply(Locale locale, BreakIterator iter, CharSequence src, A dest, Edits edits) Titlecases a string and optionally records edits (see Titlecasing uses a break iterator to find the first characters of words that are to be titlecased. It titlecases those characters and lowercases all others. (This can be modified with options bits.)
| |
| noBreakAdjustment | back to summary |
|---|---|
| public CaseMap. Returns an instance that behaves like this one but does not adjust the titlecasing BreakIterator indexes; titlecases exactly the characters at breaks from the iterator. By default, titlecasing will take each break iterator index,
adjust it to the next relevant character (see Other characters are lowercased.
| |
| noLowercase | back to summary |
|---|---|
| public CaseMap. Returns an instance that behaves like this one but does not lowercase non-initial parts of words when titlecasing. By default, titlecasing will titlecase the character at each (possibly adjusted) BreakIterator index and lowercase all other characters up to the next iterator index. With this option, the other characters will not be modified.
| |
| omitUnchangedText | back to summary |
|---|---|
| public CaseMap. Implements abstract com. Doc from com. Returns an instance that behaves like this one but
omits unchanged text when case-mapping with | |
| sentences | back to summary |
|---|---|
| public CaseMap. Returns an instance that behaves like this one but titlecases sentences rather than words. (Titlecases only the first character of each sentence, possibly adjusted.) It is an error to specify multiple titlecasing iterator options together, including both an option and an explicit BreakIterator.
| |
| wholeString | back to summary |
|---|---|
| public CaseMap. Returns an instance that behaves like this one but titlecases the string as a whole rather than each word. (Titlecases only the character at index 0, possibly adjusted.) It is an error to specify multiple titlecasing iterator options together, including both an option and an explicit BreakIterator.
| |
| Modifier and Type | Field and Description |
|---|---|
| private static final CaseMap. | |
| private static final CaseMap. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public String | Returns: the result string.The locale ID. Can be null for locale, CharSequence Locale#getDefault.
(See ULocale#toLocale.)The original string. src)Uppercases a string. |
| public <A extends Appendable> A | Returns: dest with the result string (or only changes) appended.The locale ID. Can be null for locale, CharSequence Locale#getDefault.
(See ULocale#toLocale.)The original string. src, A A buffer for the result string. Must not be null. dest, Edits Records edits for index mapping, working with styled text,
and getting only changes (if any).
This function calls edits.reset() first. edits can be null. edits)Uppercases a string and optionally records edits (see |
| public CaseMap. | omitUnchangedText()
Implements abstract com. Edits.
|
| DEFAULT | back to summary |
|---|---|
| private static final CaseMap. | |
| OMIT_UNCHANGED | back to summary |
|---|---|
| private static final CaseMap. | |
| Upper | back to summary |
|---|---|
| private Upper(int opt) | |
| apply | back to summary |
|---|---|
| public String apply(Locale locale, CharSequence src) Uppercases a string. Casing is locale-dependent and context-sensitive. The result may be longer or shorter than the original.
| |
| apply | back to summary |
|---|---|
| public <A extends Appendable> A apply(Locale locale, CharSequence src, A dest, Edits edits) Uppercases a string and optionally records edits (see
| |
| omitUnchangedText | back to summary |
|---|---|
| public CaseMap. Implements abstract com. Doc from com. Returns an instance that behaves like this one but
omits unchanged text when case-mapping with | |