Added in API level 29

Upper


class Upper : CaseMap
kotlin.Any
   ↳ android.icu.text.CaseMap
   ↳ android.icu.text.CaseMap.Upper

Uppercasing options and methods. Immutable.

Summary

Public methods
String!
apply(locale: Locale!, src: CharSequence!)

Uppercases a string.

A
apply(locale: Locale!, src: CharSequence!, dest: A, edits: Edits!)

Uppercases a string and optionally records edits (see omitUnchangedText).

CaseMap.Upper!

Returns an instance that behaves like this one but omits unchanged text when case-mapping with Edits.

Inherited functions

Public methods

apply

Added in API level 29
fun apply(
    locale: Locale!,
    src: CharSequence!
): String!

Uppercases a string. Casing is locale-dependent and context-sensitive. The result may be longer or shorter than the original.

Parameters
locale Locale!: The locale ID. Can be null for java.util.Locale#getDefault. (See ULocale#toLocale.)
src CharSequence!: The original string.
Return
String! the result string.

apply

Added in API level 29
fun <A : Appendable!> apply(
    locale: Locale!,
    src: CharSequence!,
    dest: A,
    edits: Edits!
): A

Uppercases a string and optionally records edits (see omitUnchangedText). Casing is locale-dependent and context-sensitive. The result may be longer or shorter than the original.

Parameters
locale Locale!: The locale ID. Can be null for java.util.Locale#getDefault. (See ULocale#toLocale.)
src CharSequence!: The original string.
dest A: A buffer for the result string. Must not be null.
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.
Return
A dest with the result string (or only changes) appended.

omitUnchangedText

Added in API level 29
fun omitUnchangedText(): CaseMap.Upper!

Returns an instance that behaves like this one but omits unchanged text when case-mapping with Edits.

Return
CaseMap.Upper! an options object with this option.