🌈 Create new beautiful Compose Gradients with our new wesite ->
Function

capitalize

Create capitalized AnnotatedString The capitalization sometimes maps different number of characters.

capitalize

Source set: Common
public fun AnnotatedString.capitalize(
    localeList: LocaleList = LocaleList.current
): AnnotatedString

Create capitalized AnnotatedString

The capitalization sometimes maps different number of characters. This function adjusts the text style and paragraph style ranges to transformed offset.

Note, if the style's offset is middle of the capitalization context, this function won't transform the character, e.g. style starts from between base alphabet character and accent character.

Parameters

localeList A locale list used for capitalize mapping. Only the first locale is effective. If empty locale list is passed, use the current locale instead. Note that, this locale is currently ignored since underlying Kotlin method is experimental.

Return

A capitalized string.

capitalize

Source set: Common
public fun String.capitalize(locale: Locale): String

Returns capitalized String.

Parameters

locale a locale object

Return

a transformed text

capitalize

Source set: Common
public fun String.capitalize(localeList: LocaleList): String

Returns capitalized String.

Parameters

localeList a locale list object. If empty locale list object is passed, use current locale instead.

Return

a transformed text