Stay organized with collections
Save and categorize content based on your preferences.
Upper
class Upper : CaseMap
Uppercasing options and methods. Immutable.
Summary
Public methods |
String! |
Uppercases a string.
|
A |
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 .
|
Public methods
apply
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.
Return |
String! |
the result string. |
apply
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
fun omitUnchangedText(): CaseMap.Upper!
Returns an instance that behaves like this one but omits unchanged text when case-mapping with Edits
.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# CaseMap.Upper\n\nAdded in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nUpper\n=====\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/icu/text/CaseMap.Upper \"View this page in Java\") \n\n```\nclass Upper : CaseMap\n```\n\n|---|---|-------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) |||\n| ↳ | [android.icu.text.CaseMap](/reference/kotlin/android/icu/text/CaseMap) ||\n| | ↳ | [android.icu.text.CaseMap.Upper](#) |\n\nUppercasing options and methods. Immutable.\n\nSummary\n-------\n\n| Public methods ||\n|-----------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)! | [apply](#apply(java.util.Locale,%20kotlin.CharSequence))`(`locale:` `[Locale](../../../java/util/Locale.html#)!`, `src:` `[CharSequence](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-char-sequence/index.html)!`)` Uppercases a string. |\n| A | [apply](#apply(java.util.Locale,%20kotlin.CharSequence,%20android.icu.text.CaseMap.Upper.apply.A,%20android.icu.text.Edits))`(`locale:` `[Locale](../../../java/util/Locale.html#)!`, `src:` `[CharSequence](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-char-sequence/index.html)!`, `dest:` `A`, `edits:` `[Edits](/reference/kotlin/android/icu/text/Edits)!`)` Uppercases a string and optionally records edits (see [omitUnchangedText](#omitUnchangedText())). |\n| [CaseMap.Upper](#)! | [omitUnchangedText](#omitUnchangedText())`()` Returns an instance that behaves like this one but omits unchanged text when case-mapping with [Edits](/reference/kotlin/android/icu/text/Edits). |\n\n| Inherited functions ||\n|---|---|\n| From class [CaseMap](/reference/kotlin/android/icu/text/CaseMap) |--------------------------------------------------------------------|----------------------------------------------------------------------------| | [CaseMap.Fold](/reference/kotlin/android/icu/text/CaseMap.Fold)! | [fold](/reference/kotlin/android/icu/text/CaseMap#fold())`()` \u003cbr /\u003e | | [CaseMap.Lower](/reference/kotlin/android/icu/text/CaseMap.Lower)! | [toLower](/reference/kotlin/android/icu/text/CaseMap#toLower())`()` \u003cbr /\u003e | | [CaseMap.Title](/reference/kotlin/android/icu/text/CaseMap.Title)! | [toTitle](/reference/kotlin/android/icu/text/CaseMap#toTitle())`()` \u003cbr /\u003e | | [CaseMap.Upper](#)! | [toUpper](/reference/kotlin/android/icu/text/CaseMap#toUpper())`()` \u003cbr /\u003e | ||\n\nPublic methods\n--------------\n\n### apply\n\nAdded in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun apply(\n locale: Locale!, \n src: CharSequence!\n): String!\n```\n\nUppercases a string. Casing is locale-dependent and context-sensitive. The result may be longer or shorter than the original.\n\n| Parameters ||\n|----------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `locale` | [Locale](../../../java/util/Locale.html#)!: The locale ID. Can be null for java.util.Locale#getDefault. (See [ULocale.toLocale](../util/ULocale.html#toLocale()).) |\n| `src` | [CharSequence](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-char-sequence/index.html)!: The original string. |\n\n| Return ||\n|-----------------------------------------------------------------------------------|--------------------|\n| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)! | the result string. |\n\n**See Also**\n\n- [android.icu.lang.UCharacter#toUpperCase(Locale, String)](../lang/UCharacter.html#toUpperCase(java.util.Locale,%20kotlin.String)) \n\n### apply\n\nAdded in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun \u003cA : Appendable!\u003e apply(\n locale: Locale!, \n src: CharSequence!, \n dest: A, \n edits: Edits!\n): A\n```\n\nUppercases a string and optionally records edits (see [omitUnchangedText](#omitUnchangedText())). Casing is locale-dependent and context-sensitive. The result may be longer or shorter than the original.\n\n| Parameters ||\n|----------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `locale` | [Locale](../../../java/util/Locale.html#)!: The locale ID. Can be null for java.util.Locale#getDefault. (See [ULocale.toLocale](../util/ULocale.html#toLocale()).) |\n| `src` | [CharSequence](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-char-sequence/index.html)!: The original string. |\n| `dest` | A: A buffer for the result string. Must not be null. |\n| `edits` | [Edits](/reference/kotlin/android/icu/text/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. |\n\n| Return ||\n|---|---------------------------------------------------------|\n| A | dest with the result string (or only changes) appended. |\n\n**See Also**\n\n- [android.icu.lang.UCharacter#toUpperCase(Locale, String)](../lang/UCharacter.html#toUpperCase(java.util.Locale,%20kotlin.String)) \n\n### omitUnchangedText\n\nAdded in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun omitUnchangedText(): CaseMap.Upper!\n```\n\nReturns an instance that behaves like this one but omits unchanged text when case-mapping with [Edits](/reference/kotlin/android/icu/text/Edits).\n\n| Return ||\n|---------------------|-------------------------------------|\n| [CaseMap.Upper](#)! | an options object with this option. |"]]