Kotlin / anko

Pleasant Android application development
Apache License 2.0
15.88k stars 1.29k forks source link

how to set UpperCase text ? #631

Open arjava opened 6 years ago

arjava commented 6 years ago

I did not find how to make all text into an upper case after searching here and there, is not there?

hendrawd commented 6 years ago

I think you don't even need anko to make the text(String) upper case. From kotlin-stdlib itself, StringsJVM.kt file, there is an extension function that you can use.

/**
 * Returns a copy of this string converted to upper case using the rules of the default locale.
 */
@kotlin.internal.InlineOnly
public actual inline fun String.toUpperCase(): String = (this as java.lang.String).toUpperCase()