Demote new experimental capitalize overloads in overload resolution

Revert "Fix method reference ambiguity in test after introducing 'capitalize' overload"
This reverts commit fe9bd9ee
This commit is contained in:
Ilya Gorbunov
2019-07-05 19:54:50 +03:00
parent 686bcb830e
commit 7573fcde53
2 changed files with 3 additions and 2 deletions
@@ -574,6 +574,7 @@ public actual fun String.capitalize(): String {
*/
@SinceKotlin("1.3")
@ExperimentalStdlibApi
@kotlin.internal.LowPriorityInOverloadResolution
public fun String.capitalize(locale: Locale): String {
if (isNotEmpty()) {
val firstChar = this[0]
@@ -608,6 +609,7 @@ public actual fun String.decapitalize(): String {
*/
@SinceKotlin("1.3")
@ExperimentalStdlibApi
@kotlin.internal.LowPriorityInOverloadResolution
public fun String.decapitalize(locale: Locale): String {
return if (isNotEmpty() && !this[0].isLowerCase()) substring(0, 1).toLowerCase(locale) + substring(1) else this
}