Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Methods](https://developer.android.com/reference/android/icu/text/CaseMap.Title#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/icu/text/CaseMap.Title#inhmethods)

# CaseMap.Title

*** ** * ** ***


`
public
static
final

class
CaseMap.Title
`


`


`

`

extends https://developer.android.com/reference/android/icu/text/CaseMap


`

`


`

|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) |||
| ↳ | [android.icu.text.CaseMap](https://developer.android.com/reference/android/icu/text/CaseMap) ||
|   | ↳ | android.icu.text.CaseMap.Title |

<br />

*** ** * ** ***

Titlecasing options and methods. Immutable.
**See also:**

- `https://developer.android.com/reference/android/icu/text/CaseMap#toTitle()`

## Summary

| ### Public methods ||
|---|---|
| ` https://developer.android.com/reference/android/icu/text/CaseMap.Title` | ` https://developer.android.com/reference/android/icu/text/CaseMap.Title#adjustToCased()() ` Returns an instance that behaves like this one but adjusts each titlecasing BreakIterator index to the next cased character. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/icu/text/CaseMap.Title#apply(java.util.Locale,%20android.icu.text.BreakIterator,%20java.lang.CharSequence)(https://developer.android.com/reference/java/util/Locale locale, https://developer.android.com/reference/android/icu/text/BreakIterator iter, https://developer.android.com/reference/java/lang/CharSequence src) ` Titlecases a string. |
| ` <A extends https://developer.android.com/reference/java/lang/Appendable> A` | ` https://developer.android.com/reference/android/icu/text/CaseMap.Title#apply(java.util.Locale,%20android.icu.text.BreakIterator,%20java.lang.CharSequence,%20A,%20android.icu.text.Edits)(https://developer.android.com/reference/java/util/Locale locale, https://developer.android.com/reference/android/icu/text/BreakIterator iter, https://developer.android.com/reference/java/lang/CharSequence src, A dest, https://developer.android.com/reference/android/icu/text/Edits edits) ` Titlecases a string and optionally records edits (see `https://developer.android.com/reference/android/icu/text/CaseMap.Title#omitUnchangedText()`). |
| ` https://developer.android.com/reference/android/icu/text/CaseMap.Title` | ` https://developer.android.com/reference/android/icu/text/CaseMap.Title#noBreakAdjustment()() ` 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. |
| ` https://developer.android.com/reference/android/icu/text/CaseMap.Title` | ` https://developer.android.com/reference/android/icu/text/CaseMap.Title#noLowercase()() ` Returns an instance that behaves like this one but does not lowercase non-initial parts of words when titlecasing. |
| ` https://developer.android.com/reference/android/icu/text/CaseMap.Title` | ` https://developer.android.com/reference/android/icu/text/CaseMap.Title#omitUnchangedText()() ` Returns an instance that behaves like this one but omits unchanged text when case-mapping with `https://developer.android.com/reference/android/icu/text/Edits`. |
| ` https://developer.android.com/reference/android/icu/text/CaseMap.Title` | ` https://developer.android.com/reference/android/icu/text/CaseMap.Title#sentences()() ` Returns an instance that behaves like this one but titlecases sentences rather than words. |
| ` https://developer.android.com/reference/android/icu/text/CaseMap.Title` | ` https://developer.android.com/reference/android/icu/text/CaseMap.Title#wholeString()() ` Returns an instance that behaves like this one but titlecases the string as a whole rather than each word. |

| ### Inherited methods |
|---|---|
| From class ` https://developer.android.com/reference/android/icu/text/CaseMap ` |---|---| | ` static https://developer.android.com/reference/android/icu/text/CaseMap.Fold` | ` https://developer.android.com/reference/android/icu/text/CaseMap#fold()() ` | | ` abstract https://developer.android.com/reference/android/icu/text/CaseMap` | ` https://developer.android.com/reference/android/icu/text/CaseMap#omitUnchangedText()() ` Returns an instance that behaves like this one but omits unchanged text when case-mapping with `https://developer.android.com/reference/android/icu/text/Edits`. | | ` static https://developer.android.com/reference/android/icu/text/CaseMap.Lower` | ` https://developer.android.com/reference/android/icu/text/CaseMap#toLower()() ` | | ` static https://developer.android.com/reference/android/icu/text/CaseMap.Title` | ` https://developer.android.com/reference/android/icu/text/CaseMap#toTitle()() ` | | ` static https://developer.android.com/reference/android/icu/text/CaseMap.Upper` | ` https://developer.android.com/reference/android/icu/text/CaseMap#toUpper()() ` | ||
| From class ` https://developer.android.com/reference/java/lang/Object ` |---|---| | ` https://developer.android.com/reference/java/lang/Object` | ` https://developer.android.com/reference/java/lang/Object#clone()() ` Creates and returns a copy of this object. | | ` boolean` | ` https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj) ` Indicates whether some other object is "equal to" this one. | | ` void` | ` https://developer.android.com/reference/java/lang/Object#finalize()() ` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object. | | ` final https://developer.android.com/reference/java/lang/Class<?>` | ` https://developer.android.com/reference/java/lang/Object#getClass()() ` Returns the runtime class of this `Object`. | | ` int` | ` https://developer.android.com/reference/java/lang/Object#hashCode()() ` Returns a hash code value for the object. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#notify()() ` Wakes up a single thread that is waiting on this object's monitor. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#notifyAll()() ` Wakes up all threads that are waiting on this object's monitor. | | ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/java/lang/Object#toString()() ` Returns a string representation of the object. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(long timeoutMillis, int nanos) ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#wait(long)(long timeoutMillis) ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#wait()() ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*. | ||

## Public methods

### adjustToCased

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public CaseMap.Title adjustToCased ()
```

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 "\<\<\\u4e30(abc)\>\>" instead of "49Ers" and "\<\<\\u4e30(Abc)\>\>".

It is an error to specify multiple titlecasing adjustment options together.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/icu/text/CaseMap.Title` | an options object with this option. <br /> |

**See also:**

- `https://developer.android.com/reference/android/icu/text/CaseMap.Title#noBreakAdjustment()`

### apply

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
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.)

<br />

| Parameters ||
|---|---|
| `locale` | `Locale`: The locale ID. Can be null for `https://developer.android.com/reference/java/util/Locale#getDefault()`. (See `https://developer.android.com/reference/android/icu/util/ULocale#toLocale()`.) <br /> |
| `iter` | `BreakIterator`: 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). <br /> |
| `src` | `CharSequence`: The original string. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | the result string. <br /> |

**See also:**

- `https://developer.android.com/reference/android/icu/lang/UCharacter#toUpperCase(java.util.Locale,%20java.lang.String)`

### apply

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public A apply (Locale locale, 
                BreakIterator iter, 
                CharSequence src, 
                A dest, 
                Edits edits)
```

Titlecases a string and optionally records edits (see `https://developer.android.com/reference/android/icu/text/CaseMap.Title#omitUnchangedText()`).
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.)

<br />

| Parameters ||
|---|---|
| `locale` | `Locale`: The locale ID. Can be null for `https://developer.android.com/reference/java/util/Locale#getDefault()`. (See `https://developer.android.com/reference/android/icu/util/ULocale#toLocale()`.) <br /> |
| `iter` | `BreakIterator`: 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). <br /> |
| `src` | `CharSequence`: The original string. <br /> |
| `dest` | `A`: A buffer for the result string. Must not be null. <br /> |
| `edits` | `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. <br /> |

| Returns ||
|---|---|
| `A` | dest with the result string (or only changes) appended. <br /> |

**See also:**

- `https://developer.android.com/reference/android/icu/lang/UCharacter#toTitleCase(java.util.Locale,%20java.lang.String,%20android.icu.text.BreakIterator,%20int)`

### noBreakAdjustment

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public CaseMap.Title noBreakAdjustment ()
```

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 `https://developer.android.com/reference/android/icu/text/CaseMap.Title#adjustToCased()`),
and titlecase that one.

Other characters are lowercased.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/icu/text/CaseMap.Title` | an options object with this option. <br /> |

**See also:**

- `https://developer.android.com/reference/android/icu/lang/UCharacter#TITLECASE_NO_BREAK_ADJUSTMENT`

### noLowercase

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public CaseMap.Title noLowercase ()
```

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.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/icu/text/CaseMap.Title` | an options object with this option. <br /> |

**See also:**

- `https://developer.android.com/reference/android/icu/lang/UCharacter#TITLECASE_NO_LOWERCASE`
- `https://developer.android.com/reference/android/icu/text/CaseMap.Title#adjustToCased()`

### omitUnchangedText

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public CaseMap.Title omitUnchangedText ()
```

Returns an instance that behaves like this one but
omits unchanged text when case-mapping with `https://developer.android.com/reference/android/icu/text/Edits`.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/icu/text/CaseMap.Title` | an options object with this option. <br /> |

### sentences

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public CaseMap.Title sentences ()
```

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.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/icu/text/CaseMap.Title` | an options object with this option. <br /> |

**See also:**

- `https://developer.android.com/reference/android/icu/text/CaseMap.Title#adjustToCased()`

### wholeString

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public CaseMap.Title wholeString ()
```

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.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/icu/text/CaseMap.Title` | an options object with this option. <br /> |

**See also:**

- `https://developer.android.com/reference/android/icu/text/CaseMap.Title#adjustToCased()`