decapitalize

@DeprecatedSinceKotlin(warningSince = "1.5")
expect fun String.decapitalize(): String

Returns a copy of this string having its first letter lowercased using the rules of the default locale, or the original string if it's empty or already starts with a lower case letter.

Samples

import samples.*
import java.util.Locale
import kotlin.test.*
fun main() { 
   //sampleStart 
   assertPrints("abcd".decapitalize(), "abcd")
assertPrints("Abcd".decapitalize(), "abcd") 
   //sampleEnd
}
@DeprecatedSinceKotlin(warningSince = "1.5")
fun String.decapitalize(locale: Locale): String

Returns a copy of this string having its first letter lowercased using the rules of the specified locale, or the original string, if it's empty or already starts with a lower case letter.

Since Kotlin

1.4

@DeprecatedSinceKotlin(warningSince = "1.5")
actual fun String.decapitalize(): String

Returns a copy of this string having its first letter lowercased using the rules of the default locale, or the original string if it's empty or already starts with a lower case letter.

Samples

import samples.*
import java.util.Locale
import kotlin.test.*
fun main() { 
   //sampleStart 
   assertPrints("abcd".decapitalize(), "abcd")
assertPrints("Abcd".decapitalize(), "abcd") 
   //sampleEnd
}
@DeprecatedSinceKotlin(warningSince = "1.5")
actual fun String.decapitalize(): String

Returns a copy of this string having its first letter lowercased using the rules of the default locale, or the original string if it's empty or already starts with a lower case letter.

Samples

import samples.*
import java.util.Locale
import kotlin.test.*
fun main() { 
   //sampleStart 
   assertPrints("abcd".decapitalize(), "abcd")
assertPrints("Abcd".decapitalize(), "abcd") 
   //sampleEnd
}
@DeprecatedSinceKotlin(warningSince = "1.5")
actual fun String.decapitalize(): String

Returns a copy of this string having its first letter lowercased using the rules of the default locale, or the original string if it's empty or already starts with a lower case letter.

Samples

import samples.*
import java.util.Locale
import kotlin.test.*
fun main() { 
   //sampleStart 
   assertPrints("abcd".decapitalize(), "abcd")
assertPrints("Abcd".decapitalize(), "abcd") 
   //sampleEnd
}